A CloudFormation stack creates resources and also defines parameters in Systems Manager Parameter Store that the application reads and updates at runtime. When the developer updated the stack to add tagged resources, the Parameter Store values were reset, overwriting changes the application had made. The developer wants to change the deployment so parameter values are not reset by stack updates and to minimize development effort. What should the developer do?
Choose an answer
Tap an option to check your answer.
Correct answer: Change the CloudFormation stack so the Parameter Store parameters use a DeletionPolicy of Retain..
Why this is the answer
Setting the DeletionPolicy to Retain for the Parameter Store parameters in the CloudFormation template ensures that CloudFormation does not delete or recreate these parameters during stack updates. When CloudFormation updates a resource, if it determines the resource needs to be replaced, it deletes the old resource and creates a new one. By default, Parameter Store parameters would be deleted and recreated, overwriting any runtime changes. Retain prevents this deletion, preserving the existing parameter values. DynamoDB and RDS are overkill for simple configuration parameters and require significant refactoring of the application to use a new data store, increasing development effort. Modifying the CloudFormation stack policy only restricts who can update the parameters via CloudFormation, not how CloudFormation handles the parameters during an update. It wouldn't prevent CloudFormation from overwriting parameters if it decides to replace them.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed