Courseiva

SOA-C02 Deployment, Provisioning, and Automation Practice Question

A company uses AWS CloudFormation to deploy a stack that includes an Amazon RDS DB instance. The administrator wants to ensure that the DB instance is not deleted when the stack is deleted. Which property should the administrator set in the CloudFormation template?

⚠ Common exam trap

SOA-C02 often tests the confusion between DeletionPolicy: Snapshot and Retain, where candidates think Snapshot preserves the instance, but it only preserves a snapshot and deletes the instance.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

DeletionPolicy: Retain

The DeletionPolicy: Retain property ensures that the RDS DB instance is not deleted when the CloudFormation stack is deleted. It preserves the resource, allowing it to continue running independently of the stack. This is the correct choice to prevent accidental data loss.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    DeletionPolicy: Delete

    Why it's wrong here

    DeletionPolicy: Delete is the default behavior in CloudFormation. When the stack is deleted, CloudFormation sends a Delete action to the RDS DB instance, permanently terminating it and its underlying storage without making a final snapshot. This would destroy the database you need to keep, so it is incorrect.

  • ✗

    DeletionPolicy: Snapshot

    Why it's wrong here

    DeletionPolicy: Snapshot instructs CloudFormation to take a final snapshot of the RDS DB instance and then delete the instance when the stack is removed. While the snapshot preserves a backup for future restoration, the database itself is no longer running, so it does not satisfy the requirement to retain the actual instance.

  • ✗

    DeletionPolicy: Replace

    Why it's wrong here

    Replace is not a valid value for the DeletionPolicy attribute. Valid values are Delete, Retain, and Snapshot (with RetainExceptOnCreate existing for some resource types). Attempting to use Replace results in a template validation error, preventing the stack from being deployed, and therefore cannot keep the database.

  • ✓

    DeletionPolicy: Retain

    Why this is correct

    DeletionPolicy: Retain is the correct choice because it tells CloudFormation to leave the RDS DB instance untouched when the stack is deleted. The resource is removed from the stack's management, but the database remains live, accessible, and incurring costs in your AWS account. This exactly matches the goal of preserving the database after stack deletion.

About these practice questions

Courseiva writes every SOA-C02 question from scratch — 1,169 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.