Soru

Zorluk: KolayTroubleshooting CloudFormation and CI/CD Deployments

A developer is updating an existing AWS CloudFormation stack. The update fails due to a configuration error in a new resource, and the stack rolls back to its last known stable state, transitioning to the `UPDATE_ROLLBACK_COMPLETE` status. The developer corrects the error in the template.

Which action should the developer take to successfully deploy the corrected template changes?

  1. Apply the corrected template to the existing stack by running a new update operation.Cevap
  2. B
    Remove the current stack entirely and create a new one using the corrected template.
  3. C
    Update the assume role policy document of the CloudFormation role to allow the service to bypass the configuration error.
  4. D
    Attempt to update the stack with the corrected template while the rollback operation is still actively running.

Cevap

Apply the corrected template to the existing stack by running a new update operation.
Applying the corrected template directly to the existing stack is the correct path forward because when an update fails and rolls back, the stack is in the UPDATE_ROLLBACK_COMPLETE state. This state is stable and allows direct update operations to be executed.

Adım Adım Çözüm

1
Analyze the stack status and find that it is in the UPDATE_ROLLBACK_COMPLETE state.
The stack is confirmed to be in a stable, active state after a failed update, rather than a failed initial creation.
Determining the stack state is crucial because UPDATE_ROLLBACK_COMPLETE stacks can be updated directly, whereas ROLLBACK_COMPLETE stacks from initial creation must be deleted.
2
Resolve the configuration error in the template or parameters locally.
A valid, corrected template is ready for deployment.
The deployment failed due to a configuration error, so the root cause must be corrected before initiating another update.
3
Initiate a new stack update operation using the corrected template.
The update is executed against the existing stack, applying only the necessary resource changes.
Running a stack update directly on the existing stack avoids the downtime and overhead of recreation.

Anahtar Kavram

Handling failed CloudFormation stack updates and understanding the UPDATE_ROLLBACK_COMPLETE state.
Tahmini Süre:1m 0s
Bu soruyu puanla