SAM Doctor

ERROR REFERENCE

AccessDenied (read the error before touching a policy)

A modern IAM denial names almost everything you need: the denied action, the principal, often the resource, and — in newer error text — which policy layer said no. The triage skill is extracting those four facts before changing anything, because each layer has a different fix.

WHAT IT MEANS

What the wording tells you

TRIAGE

How to triage it

  1. Confirm who was actually calling (read-only):
    aws sts get-caller-identity
    CI denials are often the wrong role being assumed, not the right role missing a permission.
  2. Grant the exact denied action to the deploy principal in the layer the error names - and only that action; resist wildcard escalation, which trades one denial for an audit finding.
  3. If an SCP is named, escalate instead of editing. The block lives at the AWS Organizations level, above this account, and is usually intentional.

AUTOMATE THE TRIAGE

Diagnose this automatically

SAM Doctor parses the denied action, principal presence, resource scope, and policy layer out of the redacted evidence, and routes explicit-deny and no-policy-allows wording to their own rules. Runs locally; no AWS access, no log upload.

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

RELATED