Official AWS CLI for scaffolding, building, testing, syncing, and deploying serverless applications with SAM templates.
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
AWS SAM CLI is AWS's command line for developing and operating serverless applications defined with SAM templates and related AWS infrastructure. It covers the common loop from project scaffolding and local emulation through deployment, cloud sync, and post-deploy inspection.
What It Enables
- Scaffold serverless apps, validate templates, build artifacts, and run Lambda functions or local HTTP APIs before touching AWS.
- Package and deploy SAM or CloudFormation stacks, sync code changes to development stacks, and bootstrap pipeline-oriented workflows from the shell.
- Inspect stack resources, endpoints, and outputs, tail CloudWatch logs and X-Ray traces, and invoke deployed resources or durable executions for follow-up verification.
Agent Fit
- The command surface spans create, change, and verify steps, so one tool can handle most of a serverless app's lifecycle instead of bouncing between raw AWS APIs and local glue scripts.
- Structured output is real but uneven: several observability, list, and remote execution paths support JSON, while build, deploy, and sync flows mostly stream human-oriented progress.
- Best fit when a skill already knows the template path, stack names, region, and whether guided flows should be replaced with explicit flags or config files.
Caveats
- Useful workflows usually need AWS credentials, a serverless template, and for local emulation a working Docker setup.
- Some commands default to interactive guidance or development-only behavior such as
sam deploy --guidedandsam sync --watch, so unattended runs should pin flags and target development stacks deliberately.