SAM Doctor

ERROR REFERENCE

Stack entered rollback (the consequence, not the cause)

ROLLBACK_IN_PROGRESS means CloudFormation is undoing a deploy because something already failed. Debugging the rollback itself is looking at the ambulance instead of the accident — the question is always what failed before it started.

WHAT IT MEANS

Where each state leads

TRIAGE

How to triage it

  1. Find the failure that triggered it — the first CREATE_FAILED/UPDATE_FAILED event before the rollback began:
    aws cloudformation describe-stack-events --stack-name my-app \
      --query 'reverse(StackEvents)[?contains(ResourceStatus, `FAILED`)] | [0]'
  2. Fix that cause, not the rollback. The rollback events themselves rarely contain new information.
  3. Then handle the landing state: delete and recreate for ROLLBACK_COMPLETE, redeploy normally after UPDATE_ROLLBACK_COMPLETE, or continue-update-rollback for the failed-rollback states.

AUTOMATE THE TRIAGE

Diagnose this automatically

SAM Doctor reports the rollback state at medium confidence and the root failure above it at high confidence, in log order - so the first finding in the report is the one to fix. Runs locally; no AWS access, no log upload.

python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown

RELATED