AWS Certified Developer – Associate (DVA-C02) — Question 184

A development team maintains a web application by using a single AWS RDS, template. The template defines web servers and an Amazon RDS database. The team uses the CloudFormation template to deploy the CloudFormation stack to different environments.

During a recent application deployment, a developer caused the primary development database to be dropped and recreated. The result of this incident was a loss of data. The team needs to avoid accidental database deletion in the future.

Which solutions will meet these requirements? (Choose two.)

Answer options

Correct answer: A, B

Explanation

Option A is correct because adding a DeletionPolicy attribute with the Retain value ensures that the database resource is not deleted during stack deletion. Option B is also correct since updating the stack policy to prevent updates to the database can help avoid accidental modifications. Options C, D, and E do not directly address the issue of preventing accidental deletion of the database.