SAM Doctor

ERROR REFERENCE

Resource did not stabilize

The service accepted CloudFormation's create or update call, but the resource never reached its steady state within the wait window, so CloudFormation gave up. The stabilization wording is only the wrapper — the real cause is usually quoted inside it.

WHAT IT MEANS

What this error means

The phrasings — Resource ... did not stabilize, HandlerErrorCode: NotStabilized, Exceeded attempts to wait — all mean CloudFormation polled the resource's status until its patience ran out. Three distinct causes hide behind that:

FIX

How to fix it

  1. Find the nested message first. Look for Resource handler returned message in the log (or the resource's own event in the service console) and treat that quoted reason as the failure to fix. Only fall back to the steps below when there is none.
  2. For slow-by-design resources: confirm the external dependency — ACM validation records actually published, CloudFront quota headroom, RDS instance-class availability — then retry. The same template often succeeds once the dependency clears.
  3. For custom resources and third-party handlers: check the handler function's own logs for the invocation. A handler that crashed or never sent its CloudFormation response is indistinguishable from a slow resource until you look at its logs.

AUTOMATE THE TRIAGE

Diagnose this automatically

SAM Doctor recognizes the stabilization wording (high confidence) and surfaces the nested handler message and resource type ahead of the generic guidance — if the underlying cause is a permission denial, both findings are reported with the denial first. Runs locally; no AWS access, no log upload.

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

RELATED