Exam DVA-C02 All QuestionsBrowse all questions from this exam
Question 341

A developer is deploying an application in the AWS Cloud by using AWS CloudFormation. The application will connect to an existing Amazon RDS database. The hostname of the RDS database is stored in AWS Systems Manager Parameter Store as a plaintext value. The developer needs to incorporate the database hostname into the CloudFormation template to initialize the application when the stack is created.

How should the developer reference the parameter that contains the database hostname?

    Correct Answer: A

    The appropriate way to reference the hostname stored as a plaintext value in AWS Systems Manager Parameter Store in an AWS CloudFormation template is to use the ssm dynamic reference. This method allows you to retrieve parameter values at instance launch time without having to store sensitive data directly in your templates, which applies to plaintext parameters as well.

Discussion
DeaconStJohnOption: A

As it is the DB hostname and not sensitive credentials I think ssm dynamic is the correct answer. Option D - is for secure string whereas this parameter is currently stored in plain text. For option C, I opted against this because for an import value, I believe there needs to be an export value from another template. The question didn't state that anything else was created via CF template. Option B - I understand to be used to reference another resource block that is in the same YAML template.

be1dca8

A since the question stated that the value is just plain text, not a secureString type

AnandeshOption: A

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html

65703c1Option: A

A is the correct answer.

KarBiswaOption: D

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/dynamic-references.html#dynamic-references-ssm-secure-strings