Course menuSOA-C03

Exams / SOA-C03 / CloudFormation and the AWS CDK / Question 3

SOA-C03 practice question: CloudFormation and the AWS CDK (3 of 3)

Deployment, Provisioning, and Automation A free question from our original SOA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

A pet insurer manages a claims project's Amazon RDS for MySQL DB instance in a CloudFormation stack. Two rules apply. First, the stack will be deleted when the project ends in two years, and a final copy of the database must remain afterward. Second, until then, no stack update may replace or delete the DB instance by accident, while other resources in the stack must stay updatable. Which TWO actions meet these requirements? (Choose two.)

Choose two answers.

  1. A. Run drift detection on the stack every day and alert the team if the DB instance's configuration has changed.
  2. B. Apply a stack policy that denies Update:Replace and Update:Delete on the DB instance and allows all updates on other resources.
  3. C. Set UpdateReplacePolicy: Retain on the DB instance so that updates are not allowed to replace it during the project.
  4. D. Set DeletionPolicy: Snapshot on the DB instance resource so that CloudFormation takes a final snapshot when the stack is deleted.
  5. E. Turn on termination protection for the stack so that the database cannot be deleted while the project is running.
Show the answer and explanation

Answers: B, D

Explanation

Two different CloudFormation controls cover the two rules. DeletionPolicy decides what happens to a resource when the stack is deleted, and Snapshot keeps a final copy of the database. A stack policy limits what stack updates may do to specific resources. Termination protection, UpdateReplacePolicy and drift detection solve related but different problems.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.