Your log stays local.
No cloud service, account connection, telemetry requirement, or raw-log upload.
Local AWS deployment diagnostics
SAM Doctor reads a failed deployment log, finds supported AWS failure patterns, then returns the evidence, confidence, and safest next step. It works without AWS credentials or a log upload.
$ sam-doctor diagnose deployment.log --format markdown
Not authorized to perform:
sts:AssumeRoleWithWebIdentityid-token: write, then review the audience and subject conditions.Built for the failure paths around
A smaller incident loop
Keep the original deployment flow. Add a deterministic first pass before changing IAM, templates, or CI configuration.
Wrap the deploy or point the CLI at a file, a sanitized excerpt, or stdin. The input stays on the machine running the command.
sam-doctor run --log-file deployment.log -- sam deploy
Each finding includes the exact redacted evidence, a stable rule ID, and a confidence level.
Evidence · line 41 · high
Use the focused next check and linked source material. SAM Doctor never applies a remediation for you.
Next · inspect trust policy
Evidence over guesses
SAM Doctor ranks supported signals, keeps excerpts short, and tells you where the match came from. The output is designed to drop into an issue, incident thread, or pull request without exposing an entire production log.
Likely cause · high confidence
EvidenceNot authorized to perform: sts:AssumeRoleWithWebIdentity
Verify
Confirm the workflow can mint an ID token, then compare its audience and subject to the role trust policy.
Failure coverage
Token permissions, trust-policy audience and subject mismatches, missing providers, and expired sessions.
Open guide StacksFind the first failed resource beneath ROLLBACK_COMPLETE, DELETE_FAILED, and nested-stack noise.
Open guide PermissionsSeparate explicit denies from missing allows, then identify the principal, action, and policy layer.
Open guide BuildDocker availability, registry pulls, esbuild, Python runtimes, dependency resolution, and artifact uploads.
Open guideGet started
Python 3.10 or newer. Run the built-in demo first, or point SAM Doctor straight at a failed deployment log.
python -m pip install sam-doctor
sam-doctor demo
sam-doctor diagnose deployment.log --format markdown
python -m pip install --upgrade sam-doctor
Stable PyPI includes all 96 documented diagnostics, plus the shell-independent run wrapper and clipboard handoff. The standard install command is all you need.
Close to the failure
Run after the deployment step with if: always(). Start non-blocking, then opt into confidence-based or strict gating after the signal is proven.
- name: Deploy and diagnose
id: sam-doctor
uses: jakegold1647/sam-doctor@v0
with:
log-file: deployment.log
run-command: sam deploy --no-confirm-changeset
summary: true
annotations: true
# fail-on-findings: true
Keep the Action advisory while your team measures signal quality, then add --fail-on-findings or a confidence gate when the evidence is stable. The @v0 tag follows stable releases; pin a specific release tag when reproducibility requires it.
Choose by command in the CI command matrix, or browse examples/README.md.
Useful boundaries
No cloud service, account connection, telemetry requirement, or raw-log upload.
No policy edits, stack updates, resource deletes, or remediation commands are run for you.
A finding is a focused starting point. It is not a claim of guaranteed root-cause analysis or a replacement for operator judgment.
Contribute a first improvement
Start with a small, mentored contributor issue or share a usage result when a diagnosis helps, misses, or leaves you unsure what to do next. Draft PRs are welcome if you want feedback before the change is finished. Want to discuss an idea or show what you built? Those paths are welcome too. If a report is wrong, tell us what you expected.
Choose a checked-in starter from the public CI recipe index, see the team rollout guide, generate a reproducible packet with sam-doctor packet deployment.log, read RESEARCHER_OVERVIEW.md, or meet the community in the contributor hall of fame.
Common questions
No. It reads only the text you provide and does not make AWS API calls.
It reports no supported finding. That is safer than inventing a cause; run sam-doctor request-packet deployment.log to write a short sanitized excerpt, review it, then open a rule request.
Yes, but only when you opt in. Start advisory, gate high-confidence findings when ready, then use strict gating if it fits your workflow.