AWS Certified Developer – Associate / Question #294 of 557

Question #294

A company's developer has deployed an application in AWS by using AWS CloudFormation. The CloudFormation stack includes parameters in AWS Systems Manager Parameter Store that the application uses as configuration settings. The application can modify the parameter values.

When the developer updated the stack to create additional resources with tags, the developer noted that the parameter values were reset and that the values ignored the latest changes made by the application. The developer needs to change the way the company deploys the CloudFormation stack. The developer also needs to avoid resetting the parameter values outside the stack.

Which solution will meet these requirements with the LEAST development effort?

A

Modify the CloudFormation stack to set the deletion policy to Retain for the Parameter Store parameters.

B

Create an Amazon DynamoDB table as a resource in the CloudFormation stack to hold configuration data for the application. Migrate the parameters that the application is modifying from Parameter Store to the DynamoDB table.

C

Create an Amazon RDS DB instance as a resource in the CloudFormation stack. Create a table in the database for parameter configuration. Migrate the parameters that the application is modifying from Parameter Store to the configuration table.

D

Modify the CloudFormation stack policy to deny updates on Parameter Store parameters.

Explanation

The correct answer is A. By setting the deletion policy of the AWS Systems Manager Parameter Store parameters to Retain, the values will not be deleted or reset when the CloudFormation stack undergoes updates. This is crucial for maintaining configuration settings that might be modified by the application, ensuring that they persist across stack modifications without requiring extra development effort. This option directly addresses the issue described in the scenario, where parameter values are reset on stack updates.

Option B suggests using an Amazon DynamoDB table for configuration data. Although it would solve the problem by providing a storage solution independent of the CloudFormation stack lifecycle, it requires significant development work for migration and integration, which contradicts the requirement for the least development effort.

Option C proposes using an Amazon RDS database. Similar to option B, this option entails greater complexity and effort to set up and maintain a database and migrate existing parameters, making it less appealing than option A.

Option D, modifying the CloudFormation stack policy to deny updates on Parameter Store parameters, could prevent the reset of values but does not solve the underlying issue of the application needing to modify parameters. It also imposes unnecessary restrictions on the ability to update the configuration settings, thus not being a favorable approach.

In summary, option A is the simplest and most effective solution for preventing the resetting of parameter values during stack updates, ensuring their persistence while minimizing development effort required.

Answer

The correct answer is: A