Courseiva
Continuous Improvement for Existing SolutionseasyMultiple ChoiceObjective-mapped

SAP-C02 UpdateReplacePolicy Practice Question

A company uses AWS CloudFormation to deploy infrastructure. They want to update a stack but need to ensure that a specific resource is not accidentally replaced. Which CloudFormation attribute should they use?

⚠ Common exam trap

Candidates often confuse DeletionPolicy with UpdateReplacePolicy. DeletionPolicy applies when a resource is removed from the template or the stack is deleted, not when an update forces replacement.

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

UpdateReplacePolicy

UpdateReplacePolicy. This attribute allows you to specify how CloudFormation handles resource updates that require replacement. You can set it to 'Retain' to keep the old resource and prevent replacement during a stack update. DeletionPolicy (option A) only controls what happens when a resource is deleted, not during updates that require replacement. CreationPolicy and UpdatePolicy do not address replacement prevention.

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

    Why it's wrong here

    Incorrect. DeletionPolicy controls behavior on resource deletion, not replacement during updates.

  • UpdateReplacePolicy

    Why this is correct

    Correct. UpdateReplacePolicy with 'Retain' prevents replacement by keeping the old resource during an update.

  • CreationPolicy

    Why it's wrong here

    Incorrect. CreationPolicy controls resource creation signals, not replacement behavior.

  • UpdatePolicy

    Why it's wrong here

    Incorrect. UpdatePolicy controls rolling updates and other update behaviors, but not replacement prevention.

About these practice questions

Courseiva writes every SAP-C02 question from scratch — 1,660 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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-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 SAP-C02 exam.