A SysOps Administrator is managing an infrastructure stack using AWS CloudFormation. The stack contains an Amazon EC2 instance and an Amazon RDS DB instance. During a recent stack update, the update failed, and CloudFormation attempted to roll back the changes. However, the rollback failed because a database administrator had manually deleted the RDS DB instance out-of-band, leaving the stack stuck in the UPDATE_ROLLBACK_FAILED state. The administrator needs to return the stack to a stable, operable state without impacting the running EC2 instance. Which action should the SysOps Administrator take to resolve this issue?
- AManually recreate the RDS DB instance with the identical identifier in the RDS console, then run the aws cloudformation update-stack CLI command to force CloudFormation to sync with the new resource.
- BDelete the CloudFormation stack while selecting the option to retain the EC2 instance, then recreate the stack using the original template to re-establish the RDS DB instance.
- Run the aws cloudformation continue-update-rollback CLI command and specify the RDS DB instance logical ID in the --resources-to-skip parameter, then manually recreate or import the database to sync with the template.Cevap
- DUpdate the CloudFormation stack service role with iam:PassRole permissions, then run the aws cloudformation rollback-stack CLI command to force the rollback to bypass the missing resource.
Cevap
Run the aws cloudformation continue-update-rollback CLI command and specify the RDS DB instance logical ID in the --resources-to-skip parameter, then manually recreate or import the database to sync with the template.
The correct action is to run the continue-update-rollback command and specify the RDS DB instance logical ID in the resources to skip parameter. This allows CloudFormation to skip the rollback operations for the deleted resource and transition the stack to the UPDATE_ROLLBACK_COMPLETE state, returning it to a stable, operable state.
Adım Adım Çözüm
Anahtar Kavram
Remediating rollback failures caused by out-of-band resource deletion using ContinueUpdateRollback
Tahmini Süre:2m 30s