
Answer-first summary for fast verification
Answer: Apply a DeletionPolicy attribute to the database resource in the CloudFormation template to retain it upon stack deletion., Establish a stack policy in CloudFormation to restrict updates to the database resource, safeguarding against unintended changes.
The correct answers are A and B. Applying a DeletionPolicy attribute with the Retain value to the database resource in the CloudFormation template (option A) ensures that the database is preserved even if the stack is deleted, preventing accidental deletion. Additionally, updating the CloudFormation stack policy to prevent updates to the database (option B) protects the database from unintended changes during stack updates. These measures effectively address the requirements to avoid accidental database deletions.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A development team uses an AWS RDS template with CloudFormation to deploy web applications and databases across environments. After a developer accidentally dropped the primary development database, causing data loss, the team seeks measures to prevent future accidental database deletions. What two solutions should be implemented?
A
Apply a DeletionPolicy attribute to the database resource in the CloudFormation template to retain it upon stack deletion.
B
Establish a stack policy in CloudFormation to restrict updates to the database resource, safeguarding against unintended changes.
C
Implement Multi-AZ deployment for database availability, which does not prevent accidental deletions.
D
Utilize CloudFormation stack sets for managing deployments across accounts and regions, unrelated to preventing database deletions.
E
Set a DeletionPolicy attribute to the entire stack in CloudFormation, which retains all resources, not a targeted approach to the database.
No comments yet.