An administrator is managing an infrastructure stack using AWS CloudFormation. The stack includes an AWS IAM role used for an application's execution and an Amazon S3 bucket. An operator accidentally deleted the IAM role manually from the IAM Console. Shortly after, a scheduled automated stack update is triggered, but it fails due to an unrelated configuration error in another resource. The stack attempts to roll back, but the rollback fails, placing the stack in the UPDATE_ROLLBACK_FAILED state because the IAM role cannot be found. Which of the following actions can the SysOps Administrator take to successfully resolve the UPDATE_ROLLBACK_FAILED state and return the stack to a stable configuration? (Select TWO.)
- Manually recreate the IAM role with the exact same name as defined in the CloudFormation stack template, then initiate the Continue Update Rollback operation.Cevap
- Initiate the Continue Update Rollback operation and specify the logical ID of the deleted IAM role in the list of resources to skip.Cevap
- CRun drift detection on the stack, select the drifted IAM role resource, and execute the resource import operation to automatically recreate the role.
- DUpdate the CloudFormation stack template to remove the IAM role reference, and perform a stack update with the ForceRollback parameter set to true.
- EModify the IAM execution role policy to grant the iam:PassRole permission, then re-run the stack update command to bypass the rollback failure.
Cevap
To resolve the UPDATE_ROLLBACK_FAILED state, the administrator must either manually recreate the deleted IAM role with the same name before continuing the rollback, or perform a Continue Update Rollback operation and specify the logical ID of the IAM role in the resources to skip list.
The correct options involve resolving the rollback failure either by manually recreating the IAM role with the same physical name (which satisfies CloudFormation's lookups during rollback) or by using the Continue Update Rollback feature and explicitly skipping the missing IAM role resource. Both actions successfully bypass the rollback failure and return the stack to a stable state.
Adım Adım Çözüm
Anahtar Kavram
CloudFormation Continue Update Rollback and Skipping Resources