Soru

Zorluk: OrtaAWS CloudFormation

A developer is maintaining an application stack deployed via AWS CloudFormation. A recent stack update failed because a Security Group managed by the stack was manually deleted via the Amazon EC2 console, causing the stack rollback to fail. The stack is currently stuck in the UPDATE_ROLLBACK_FAILED state. The developer needs to return the stack to a stable state so they can apply a new template. Which two actions must the developer perform to resolve this issue? (Select TWO.)

  1. Invoke the ContinueUpdateRollback operation from the AWS CloudFormation console or CLI.Cevap
  2. Recreate the manually deleted Security Group with the exact same physical name, or specify the resource to be skipped in the ResourcesToSkip parameter during the rollback continuation.Cevap
  3. C
    Initiate a new stack update directly using the UpdateStack API with the --disable-rollback parameter enabled.
  4. D
    Run drift detection on the stack and select the 'Auto-Reconcile' option to let CloudFormation automatically recreate the missing Security Group.
  5. E
    Retrieve the Security Group's configuration parameters from AWS Systems Manager Parameter Store using a dynamic reference to force-refresh the template state.

Cevap

To resolve the UPDATE_ROLLBACK_FAILED state, the developer must continue the rollback using the ContinueUpdateRollback operation and either recreate the manually deleted Security Group or specify it as a resource to skip during rollback.
To resolve the UPDATE_ROLLBACK_FAILED state, the developer must continue the rollback using the ContinueUpdateRollback operation. Because the failure was caused by a manually deleted resource (the Security Group), the rollback cannot proceed unless the developer either recreates the resource with the exact same physical ID/name so the rollback process can delete or modify it, or explicitly skips the resource using the ResourcesToSkip parameter.

Adım Adım Çözüm

1
Analyze the cause of the rollback failure
Identify that the rollback failed because a Security Group managed by the stack was deleted out-of-band.
CloudFormation attempts to clean up or modify the Security Group during rollback, but cannot find it, causing the rollback to fail.
2
Perform remedial action on the deleted resource
Either recreate the Security Group manually with the exact configuration and physical name, or prepare to skip it during rollback.
This satisfies CloudFormation's expectation of the resource's existence or instructs CloudFormation to ignore it, allowing the rollback to proceed.
3
Trigger ContinueUpdateRollback
Run the continue-update-rollback CLI command (or use the console) specifying the ResourcesToSkip if skipping.
This transitions the stack from UPDATE_ROLLBACK_FAILED back to a stable UPDATE_ROLLBACK_COMPLETE state, enabling future updates.

Anahtar Kavram

Resolving UPDATE_ROLLBACK_FAILED state in AWS CloudFormation
Bu soruyu puanla