Question 1,381 of 256
DOP-C02 Configuration Management and IaC Practice Question
A DevOps team is using AWS CloudFormation to manage a multi-tier application. They want to ensure that when an update to the stack causes a resource replacement, the replacement occurs only after the new resource is fully created and tested. Which CloudFormation feature should they use?
⚠ Common exam trap
Candidates often confuse the UpdatePolicy (used for rolling updates in Auto Scaling) with CreationPolicy (used to wait for resource creation signals). The trap is to think that only Auto Scaling resources can be tested during replacement; many resources support CreationPolicy for signal-based testing during 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
✓
CreationPolicy attribute
The CreationPolicy attribute can be added to a resource to ensure that CloudFormation waits for a specified number of success signals before considering the resource created. When a stack update causes a resource replacement, CloudFormation creates the new resource, waits for the creation signals (if a CreationPolicy is defined), and only then deletes the old resource. This ensures the new resource is fully operational and tested before replacement. The other options are incorrect: UpdatePolicy with AutoScalingRollingUpdate is for updating instances in an Auto Scaling group without full replacement; DeletionPolicy Retain keeps the old resource but does not manage creation; DependsOn controls creation order but does not wait for testing signals.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
UpdatePolicy attribute with AutoScalingRollingUpdate
Why it's wrong here
Correct. The `UpdatePolicy` with `AutoScalingRollingUpdate` allows you to specify parameters that ensure new instances are created and healthy before old ones are terminated, providing create-before-destroy behavior for Auto Scaling groups.
- ✓
CreationPolicy attribute
Why this is correct
Incorrect. The `CreationPolicy` attribute does not have a `CreateBeforeDestroy` property. It is used to wait for a signal from the resource after creation, not to control the order of replacement during updates.
- ✗
DeletionPolicy attribute set to Retain
Why it's wrong here
Incorrect. The `DeletionPolicy` attribute set to `Retain` preserves the resource when the stack is deleted, not during an update. It does not ensure create-before-destroy.
- ✗
DependsOn attribute to specify creation order
Why it's wrong here
Incorrect. The `DependsOn` attribute only specifies creation order, not replacement behavior. It cannot ensure the new resource is tested before the old one is deleted.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jul 4, 2026
This DOP-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 DOP-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.