ERROR REFERENCE
Stack is in ROLLBACK_COMPLETE state and can not be updated
A terminal CloudFormation stack must be recreated before deployment
CloudFormation refuses an update when the stack is in
ROLLBACK_COMPLETE after a failed first create or
DELETE_COMPLETE after deletion. The next operation must
recreate the stack, with the right cleanup and root-cause checks first.
WHAT IT MEANS
What this error means
Stack: my-app is in ROLLBACK_COMPLETE state and can not be updated.
Stack: my-app is in DELETE_COMPLETE state and can not be updated.
ROLLBACK_COMPLETE follows a failed initial stack creation,
while DELETE_COMPLETE means CloudFormation has finished
deleting the stack. Neither state is an update target, so a subsequent
sam deploy or aws cloudformation deploy must
take the create path.
- Rollback state. A resource failed during the first create; that root cause can fail the recreation again.
- Delete-complete state. The stack is gone from the active set; retained resources or custom names can still affect the next create.
FIX
How to fix it
-
Confirm the terminal state and inspect events
(read-only). For a rollback, locate the earliest
CREATE_FAILEDentry:aws cloudformation describe-stack-events --stack-name YOUR_STACK \ --query "StackEvents[?ResourceStatus=='CREATE_FAILED'].[LogicalResourceId,ResourceStatusReason]" \ --output table - Fix the original cause when the state is ROLLBACK_COMPLETE. Deleting and recreating without fixing the first failed resource reproduces the same failure.
-
Review the cleanup path. For DELETE_COMPLETE, wait
until deletion is complete and inspect retained resources and custom
names before creating again. For a rolled-back initial create, review
what the failed stack holds before deleting it:
aws cloudformation delete-stack --stack-name YOUR_STACK aws cloudformation wait stack-delete-complete --stack-name YOUR_STACK - Create again with the same stack name. Once the root cause is fixed, deletion is complete, and retained-resource conflicts are understood, the create can proceed normally.
-
Optional for iterating on new stacks:
sam deploy --disable-rollbackkeeps successfully created resources on failure so you can fix forward. Use it consciously; it leaves partial stacks behind.
AUTOMATE THE TRIAGE
Diagnose this automatically
SAM Doctor recognizes both terminal states (high confidence), separates them from ordinary rollback noise, and points you at the first failed resource or cleanup check. Runs locally; no AWS access, no log upload.
python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown
RELATED
Related errors
- DELETE_FAILED — cleanup is blocked by a resource that still exists.
- InsufficientCapabilitiesException — a possible root cause of the original create failure.
- Rate exceeded (Throttling) — a transient API limit that can fail an initial create.
Longer walkthrough: finding the first useful CloudFormation failure.