A developer is updating an AWS CloudFormation stack that manages a production application. The update fails during the creation of a new database instance due to a parameter conflict. CloudFormation automatically initiates a rollback, but the rollback fails because an Amazon S3 bucket, which was manually modified out-of-band, now has a bucket policy that denies the CloudFormation service role the permissions required to delete it. The stack is now in the `UPDATE_ROLLBACK_FAILED` state. The developer updates the S3 bucket policy to allow the CloudFormation service role to delete the bucket.
Which action must the developer perform next to return the stack to a stable state so that future updates can be applied?
- ADelete the CloudFormation stack to remove the failed state, and then recreate the stack using the corrected template.
- Execute the `aws cloudformation continue-update-rollback` command to resume the rollback and return the stack to a stable state.Answer
- CExecute the `aws cloudformation update-stack` command with the corrected template to directly overwrite the failed rollback state.
- DModify the trust policy of the CloudFormation service role to explicitly grant it permissions to delete the S3 bucket.
Answer
Execute the `aws cloudformation continue-update-rollback` command to resume the rollback and return the stack to a stable state.
The correct action is to resume the rollback by executing the `continue-update-rollback` command. Since the permissions issue blocking the deletion of the S3 bucket has been resolved, CloudFormation will successfully delete the bucket and return the stack to the `UPDATE_ROLLBACK_COMPLETE` state, which allows subsequent updates.
Step-by-Step Solution
Key Concept
Handling CloudFormation stack update rollback failures using the ContinueUpdateRollback action.
Estimated Time:2m 0s