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.
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
- Delete the stack stuck in ROLLBACK_COMPLETE (it contains no live resources).
- Wait for the delete to finish.
- Re-run the deploy so a fresh create runs.
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.ymlFix 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-templatebefore deploy. - Resolve the first CREATE_FAILED reason rather than retrying blindly.
- Have CI delete ROLLBACK_COMPLETE stacks before recreating.