A SysOps Administrator is managing a CloudFormation stack that deploys a database application, using a dedicated AWS Identity and Access Management (IAM) service role for stack operations. The administrator attempts to update the stack to replace an Amazon RDS DB instance with a new configuration. The update fails during the deployment of a dependent resource, triggering a rollback. However, the rollback fails, and the stack status changes to UPDATE_ROLLBACK_FAILED. AWS CloudTrail logs reveal that the service role was unable to perform the deletion of the old RDS DB instance due to an AccessDenied error. What should the administrator do to resolve the rollback failure and return the stack to a stable state?
- ADelete the old RDS DB instance manually using the Amazon RDS console, and then run the rollback-stack command targeting the stack.
- Update the IAM policy attached to the CloudFormation service role to grant the rds:DeleteDBInstance permission, and then run the continue-update-rollback command.Cevap
- CAttach an IAM policy with iam:PassRole permissions to the administrator's IAM identity, and then run the update-stack command with the --role-arn parameter pointing to the service role.
- DRun the update-stack command with the --rollback-configuration parameter set to disable rollback for the RDS DB instance resource.
Cevap
Update the IAM policy attached to the CloudFormation service role to grant the rds:DeleteDBInstance permission, and then run the continue-update-rollback command.
The correct action is to update the IAM policy of the service role with the missing rds:DeleteDBInstance permission and run the continue-update-rollback command. This allows AWS CloudFormation to resume the rollback process using the updated permissions of the service role and return the stack to a stable state.
Adım Adım Çözüm
Anahtar Kavram
AWS CloudFormation Update Rollback Failure Resolution