DVA-C02 Deployment Practice Question
Which TWO actions can be taken to enable automatic rollback for an AWS CloudFormation stack update that fails? (Select TWO.)
⚠ Common exam trap
Watch out — candidates often confuse the `--on-failure` parameter (which only applies to stack creation) with stack update rollback, or they assume that a stack policy or change set can trigger automatic rollback, when in fact only `--rollback-configuration` and `--disable-rollback` control automatic rollback behavior during updates.
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
✓
Specify a CloudWatch alarm in the '--rollback-configuration' parameter during stack update.
The `--rollback-configuration` parameter allows you to specify a CloudWatch alarm that, when triggered during a stack update, automatically initiates a rollback. This is the intended mechanism for monitoring-based automatic rollback, as CloudFormation will monitor the alarm state and revert the update if the alarm enters the ALARM state. Option E is correct because setting `--disable-rollback` to `false` explicitly enables automatic rollback on any stack update failure, which is the default behavior but can be explicitly configured for clarity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set the '--on-failure' parameter to 'ROLLBACK' during stack update.
Why it's wrong here
The '--on-failure' parameter is specifically designed to control the behavior of CloudFormation during stack *creation* if an error occurs, dictating whether the stack rolls back, deletes, or remains in a failed state. It has no applicability or effect on stack *update* operations. Stack updates utilize different mechanisms for managing failures and rollbacks, making this parameter irrelevant for enabling automatic rollback during an update.
- ✓
Specify a CloudWatch alarm in the '--rollback-configuration' parameter during stack update.
Why this is correct
Specifying a CloudWatch alarm within the '--rollback-configuration' parameter during a stack update is a powerful mechanism for enabling automatic rollback. This configuration allows CloudFormation to monitor the specified alarm(s) for a defined period after the update completes. If any of these alarms transition into an ALARM state, CloudFormation will automatically initiate a rollback of the stack to its previous stable state, ensuring operational stability.
- ✗
Use a change set to review the changes before updating.
Why it's wrong here
Using a change set provides a crucial preview of how proposed modifications will affect a CloudFormation stack's resources before the update is executed. It allows developers to review and understand the impact of changes, helping to prevent unintended resource modifications or deletions. However, a change set is purely a planning and review tool; it does not inherently enable or trigger any automatic rollback functionality during or after the stack update process.
- ✗
Apply a stack policy that denies updates to critical resources.
Why it's wrong here
Applying a stack policy is a security and governance measure that defines explicit permissions for update actions on specific resources within a CloudFormation stack. Its primary purpose is to protect critical resources from accidental or unauthorized modifications by denying certain update operations. While it safeguards resources, a stack policy does not provide any mechanism for automatically rolling back a stack in response to deployment failures or operational issues.
- ✓
Set the '--disable-rollback' parameter to 'false' during stack update.
Why this is correct
Setting the '--disable-rollback' parameter to 'false' during a stack update explicitly ensures that CloudFormation's default automatic rollback behavior remains active. By default, CloudFormation attempts to roll back a stack to its previous stable state if an update operation fails due to issues like resource provisioning errors. Setting this parameter to 'false' (which is its default state) confirms that this essential failure recovery mechanism is enabled, preventing the stack from being left in a partially updated or inconsistent state.
Go deeper
Related to this question
About these practice questions
One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-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 DVA-C02 exam.