AWS Certified CloudOps Engineer - Associate (SOA-C03) free question 6 / 10 · Domain 3: Deployment, Provisioning, and Automation
A stack update failed and the rollback then failed, leaving the stack in UPDATE_ROLLBACK_FAILED. The cause is that the previous database instance was deleted outside CloudFormation, which still expects it. What is the way to get the stack back to a working state?
- Submit a new update with a corrected template while the stack is in UPDATE_ROLLBACK_FAILED, so that the update replaces the rollback
- Turn on drift detection for the stack, which brings the stack back in sync and ends the failed rollback by itself
- Create a change set for the stack and execute it, so that CloudFormation recreates the database instance and ends the rollback
- Fix the cause manually, and then continue the update rollback so that the stack reaches UPDATE_ROLLBACK_COMPLETE
Show the answer and explanation
Answer: D
Why this is correct
UPDATE_ROLLBACK_FAILED means that a dependent resource cannot return to its original state, for example because CloudFormation expects a database instance that someone deleted outside the stack. Depending on the cause, you fix the error manually and continue the rollback. Continuing the rollback returns the stack to a working state, UPDATE_ROLLBACK_COMPLETE, and then you can try the update again.
Why the other options are wrong
"Submit a new update with a corrected template while the stack is in UPDATE_ROLLBACK_FAILED, so that the update replaces the rollback" … The stack must return to a working state, UPDATE_ROLLBACK_COMPLETE, by continuing the rollback. After that you can try to update the stack again.
"Create a change set for the stack and execute it, so that CloudFormation recreates the database instance and ends the rollback" … A change set is a way to update a stack, and the stack first needs to leave the failed rollback state by continuing the rollback after the cause is fixed.
"Turn on drift detection for the stack, which brings the stack back in sync and ends the failed rollback by itself" … Drift detection reports resources that changed outside CloudFormation. It does not fix them or continue a rollback.
Key points
For a rollback that fails because a signal was not received, the page suggests the signal-resource command. Making changes outside CloudFormation causes problems like this, and drift detection helps to find them. The troubleshooting page lists other causes of a failed rollback, such as not receiving the required number of signals, together with the way to continue the rollback.