SAM Doctor

ERROR REFERENCE

The CloudFormation deploy wrapper reported a failure

“Failed to create/update the stack” only says that the operation failed. It does not name the resource or the reason. Fetch the stack events before changing a template, permission, or CI step.

WHAT IT MEANS

What this message means

Failed to create/update the stack. Run the following command to fetch the list of events leading up to the failure.

This is a low-confidence handoff, not a root-cause diagnosis. The useful status reason may be in earlier output or only in the CloudFormation event stream.

NEXT CHECK

Fetch the evidence

  1. Read the stack events without changing anything:
    aws cloudformation describe-stack-events --stack-name <stack>
  2. Find the earliest CREATE_FAILED or UPDATE_FAILED event. Its exact status reason is the cause to investigate; rollback lines later in the stream are usually consequences.
  3. Run the focused excerpt through SAM Doctor after reviewing and redacting it:
    sam-doctor diagnose deployment.log --format markdown
  4. If the event stream has no resource failure, preserve the operation, Region, timestamp, and request ID and investigate the surrounding API error instead of changing the template based on this wrapper alone.

AUTOMATE THE TRIAGE

Use the handoff automatically

SAM Doctor recognizes this wrapper line with low confidence and points at the read-only event command. It does not invent a cause. Runs locally; no AWS access, no log upload.

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

RELATED