A developer is managing an AWS CloudFormation stack for a production application. After a failed update to an Amazon RDS database instance, the stack is stuck in the UPDATE_ROLLBACK_FAILED state. The developer discovers that another team member had previously made manual, out-of-band configuration changes to the database instance directly in the AWS Console. How should the developer resolve this situation and successfully perform the stack update?
- AManually delete the database instance via the Amazon RDS console, manually recreate a new database instance with the target configuration, and then run drift detection to automatically reconcile the stack.
- BDirectly run the update-stack CLI command with the updated template and a --force-update flag to override the failed rollback state and apply the new configuration.
- Identify the manual changes, use the CloudFormation console or CLI to run the ContinueUpdateRollback action to return the stack to a stable state, update the template to reflect the actual resource configuration, and then perform the update.Cevap
- DCreate a new Systems Manager Parameter Store parameter of type String to store the database password, and update the template to reference it using the {{resolve:ssm:parameter_name}} dynamic reference.
Cevap
To resolve an UPDATE_ROLLBACK_FAILED state caused by out-of-band changes, the developer must run the ContinueUpdateRollback action to stabilize the stack, align the template with the actual resource state, and then perform the update.
Executing the ContinueUpdateRollback action is the standard AWS procedure to recover a stack from the UPDATE_ROLLBACK_FAILED state. Once the stack is stabilized to UPDATE_ROLLBACK_COMPLETE, the developer can align the template with the actual drifted state of the database and safely run the update.
Adım Adım Çözüm
Anahtar Kavram
Resolving CloudFormation stack update rollback failures caused by resource drift
Tahmini Süre:1m 30s