Skip to content
Latchkey

CloudFormation "ROLLBACK_COMPLETE ... cannot be updated" in CI

A stack whose first create failed ends in ROLLBACK_COMPLETE. That state is terminal: CloudFormation will not update it, so the next deploy fails until the empty stack is deleted and recreated.

What this error means

The deploy fails immediately with "Stack <name> is in ROLLBACK_COMPLETE state and can not be updated." No resource events follow because the update never starts.

CloudFormation
An error occurred (ValidationError) when calling the UpdateStack operation:
Stack:arn:aws:cloudformation:us-east-1:...:stack/my-app/... is in ROLLBACK_COMPLETE
state and can not be updated.

Common causes

The initial create failed and rolled back

ROLLBACK_COMPLETE only happens after a failed first create. The stack holds no usable resources but blocks any update.

CI retries an update instead of recreating

The pipeline calls update-stack or deploy on a stack that never successfully created, so it hits the terminal state every time.

How to fix it

Delete the failed stack, then redeploy

  1. Delete the stack stuck in ROLLBACK_COMPLETE (it contains no live resources).
  2. Wait for the delete to finish.
  3. Re-run the deploy so a fresh create runs.
Terminal
aws cloudformation delete-stack --stack-name my-app
aws cloudformation wait stack-delete-complete --stack-name my-app
aws cloudformation deploy --stack-name my-app --template-file template.yml

Fix the underlying create failure first

Read the original CREATE_FAILED event reason and fix it (a name clash, a missing permission) so the recreate succeeds instead of rolling back again.

How to prevent it

  • Validate templates with aws cloudformation validate-template before deploy.
  • Resolve the first CREATE_FAILED reason rather than retrying blindly.
  • Have CI delete ROLLBACK_COMPLETE stacks before recreating.

Frequently asked questions

What causes ""is in ROLLBACK_COMPLETE state and can not be updated""?
ROLLBACK_COMPLETE only happens after a failed first create. The stack holds no usable resources but blocks any update.
How do I fix "is in ROLLBACK_COMPLETE state and can not be updated"?
Delete the failed stack, then redeploy

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card