An operations team uses an AWS CloudFormation stack to manage security infrastructure. During a stack update, a resource creation error occurs, triggering an automatic rollback. However, the rollback process fails, and the stack status changes to UPDATE_ROLLBACK_FAILED because an IAM role managed by the stack was previously deleted manually.
Which of the following actions should the SysOps Administrator perform to resolve this issue and return the stack to a stable state?
- Run the aws cloudformation continue-update-rollback command with the --resources-to-skip parameter set to the logical ID of the deleted IAM role.Cevap
- BRun a drift detection scan on the stack to automatically synchronize its state and recreate the deleted IAM role.
- CDelete the entire CloudFormation stack and then redeploy it from scratch using the original template.
- DAssign a policy containing the iam:PassRole permission to the IAM user executing the stack update, then retry the update.
Cevap
Run the aws cloudformation continue-update-rollback command with the --resources-to-skip parameter set to the logical ID of the deleted IAM role.
The correct action is to call the continue-update-rollback operation and skip the resource that caused the failure. When a stack is stuck in UPDATE_ROLLBACK_FAILED, CloudFormation allows you to resume the rollback while skipping specific resources (using the --resources-to-skip option in the CLI or through the console). This marks the skipped resources as rolled back and returns the stack to a stable UPDATE_ROLLBACK_COMPLETE state, allowing further updates or cleanups to be performed.
Adım Adım Çözüm
Anahtar Kavram
Remediating CloudFormation stacks in the UPDATE_ROLLBACK_FAILED state by skipping resources during rollback.