A developer is managing an AWS CloudFormation stack for a production backend application. During a stack update, the deployment fails, and the stack enters the UPDATE_ROLLBACK_FAILED state because an IAM role referenced by the template was manually deleted out-of-band. The developer has corrected the template and needs to apply the update to the stack. Which action should the developer take to resolve the stack state and successfully deploy the update?
- Use the ContinueUpdateRollback operation to return the stack to the UPDATE_ROLLBACK_COMPLETE state, optionally recreating the deleted IAM role or skipping it during the rollback, and then perform the stack update with the corrected template.Cevap
- BExecute the update command again using the --force-update flag to force the deployment of the corrected template directly over the failed rollback state.
- CRun drift detection on the stack and select the auto-remediate option to automatically recreate the deleted IAM role based on the drift report, then proceed with the update.
- DStore the corrected IAM role definition in Systems Manager Parameter Store as a secure string, reference it in the template using a dynamic reference, and execute the stack update.
Cevap
Use the ContinueUpdateRollback operation to return the stack to the UPDATE_ROLLBACK_COMPLETE state (optionally skipping or recreating the deleted role), and then perform the stack update with the corrected template.
To update a CloudFormation stack that is stuck in the UPDATE_ROLLBACK_FAILED state, you must first return the stack to a stable state. Triggering ContinueUpdateRollback allows CloudFormation to complete the rollback by either skipping the deleted resource or using a recreated version of it. Once the stack is in the UPDATE_ROLLBACK_COMPLETE state, you can successfully apply the corrected template.
Adım Adım Çözüm
Anahtar Kavram
Resolving CloudFormation update rollback failures due to deleted resources.
Tahmini Süre:1m 30s