Soru

Zorluk: OrtaAWS CloudFormation

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?

  1. A
    Manually 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.
  2. B
    Directly 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.
  3. 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
  4. D
    Create 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

1
Identify manual configuration changes that caused the rollback failure.
Find the drift or discrepancy between the template and the actual resource state.
Manual out-of-band changes prevent CloudFormation from rolling back resources to their expected state.
2
Execute the ContinueUpdateRollback operation via the CLI or AWS Console.
The stack transitions from UPDATE_ROLLBACK_FAILED to UPDATE_ROLLBACK_COMPLETE.
This action bypasses or retries the failed rollback step, bringing the stack back to a stable state where updates are permitted.
3
Align the template with the actual configuration of the resources and redeploy.
The stack is successfully updated with no configuration drift.
Ensuring the template matches the real-world state prevents future update or rollback failures.

Anahtar Kavram

Resolving CloudFormation stack update rollback failures caused by resource drift
Tahmini Süre:1m 30s
Bu soruyu puanla