QuestionQ6

Deployment

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

A CloudFormation stack policy that denies update actions on the Parameter Store resources stops future stack updates, such as adding new tagged resources, from touching those specific resources, so values the application changes out-of-band are preserved. This requires only a policy change and no redesign of how configuration is stored. A DeletionPolicy of Retain only governs what happens when a resource is removed or replaced during a stack operation; it does not prevent CloudFormation from reapplying the template's declared value to a resource that remains in the stack during a normal update. Learn more: Prevent updates to stack resources

Community Discussion

No comments yet. Be the first to start the discussion!