Question

Difficulty: EasyTroubleshooting CloudFormation and CI/CD Deployments

A developer attempts to deploy a new infrastructure stack using an AWS CloudFormation template. The initial stack creation fails during the creation of an Amazon DynamoDB table, and the stack status changes to ROLLBACK_COMPLETE. The developer corrects the table configuration in the template and wants to deploy the corrected template.

Which of the following actions can the developer take to deploy the updated template successfully? (Select TWO.)

  1. Delete the current stack, and then create a new stack using the corrected template.Answer
  2. Deploy the corrected template as a new stack under a different stack name.Answer
  3. C
    Run the update-stack CLI command on the existing stack, pointing to the corrected template.
  4. D
    Execute the continue-update-rollback CLI command on the current stack to resume the deployment with the corrected template.
  5. E
    Perform drift detection on the current stack to automatically resolve the failed DynamoDB table state, then apply the updated template.

Answer

Deleting the failed stack and creating a new one, or deploying the template as a new stack with a different name.
To resolve a failed initial stack creation that has rolled back to the ROLLBACK_COMPLETE state, the developer must either delete the failed stack and create a new one using the corrected template, or deploy the template as a new stack with a different name. This is because a stack in the ROLLBACK_COMPLETE state from a failed initial creation cannot be updated directly.

Step-by-Step Solution

1
Identify the current state of the stack and how it was reached.
The stack is in the ROLLBACK_COMPLETE state due to a failure during its initial creation.
The rollback state determines what actions are allowed on the stack.
2
Determine if update operations are supported in the current state.
AWS CloudFormation does not allow update operations on stacks that have failed initial creation and rolled back to ROLLBACK_COMPLETE.
Understanding limitations of ROLLBACK_COMPLETE helps eliminate invalid update actions.
3
Select valid methods to deploy the corrected template.
The developer must either delete the failed stack and recreate it, or deploy the corrected template as a new stack with a different name.
These are the only allowed paths to deploy the resource definitions successfully.

Key Concept

Troubleshooting CloudFormation ROLLBACK_COMPLETE state on initial stack creation
Estimated Time:1m 0s
Rate this question