aws-sam-cli
AWS SAM CLI is a CLI tool for local development and testing of Serverless applications
What it is and what it does
AWS SAM CLI is the command-line interface for the AWS Serverless Application Model, a framework that simplifies building and deploying serverless applications on AWS. It provides local development and testing environments where you can build Lambda functions, test API Gateway endpoints, and emulate AWS services in Docker containers before deploying to the cloud. The tool handles initialization of new projects from templates, compilation and packaging of functions, local execution with CloudWatch log tailing, and deployment via CloudFormation.
The package integrates with 24 runtime dependencies including boto3 for AWS API access, Docker for local Lambda emulation, Flask for local API testing, and various utilities for YAML parsing, templating, and schema validation. It targets developers building serverless applications and supports modern Python versions from 3.10 onward. The tool is actively maintained by AWS with frequent releases and a large community presence.
Use it for:
- Initialize and scaffold new serverless projects with predefined AWS templates using sam init.
- Build and locally test Lambda functions and API Gateway endpoints in a Docker container before cloud deployment.
- Deploy SAM and CloudFormation templates to AWS with sam deploy for rapid iteration.
- Sync and test incremental changes in cloud developer environments with sam sync.
- Tail CloudWatch logs and X-Ray traces from deployed serverless applications using sam logs and sam traces.
- Generate CI/CD pipeline templates for popular systems with sam pipeline init.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
AWS SAM CLI is a command-line tool for building, testing, and deploying serverless applications with Lambda, API Gateway, Step Functions, and related AWS services locally and to the cloud.
Yes. AWS SAM CLI is production-stable, actively maintained, has no known vulnerabilities, and low install friction. It is the standard tool for local serverless development on AWS and essential for teams building Lambda-based applications. The Apache-2.0 license poses no restrictions. Install it if you develop serverless applications on AWS.
Install
aws-sam-cli on PyPI
pip
pip install aws-sam-cliuv
uv add aws-sam-clipoetry
poetry add aws-sam-cliInstalling aws-sam-cli
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a release 14 days ago and 6728 repository stars. Supports current Python versions (3.10–3.14) and has no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for both open-source and proprietary serverless projects.
Quickstart
pip install aws-sam-cli
sam init
sam build
sam local start-api
Requires Docker to run Lambda functions locally; AWS credentials configured for cloud deployment.
Verify before relying
- Whether all 24 runtime dependencies are required for basic use or if some are optional for specific features.
- Performance characteristics when testing large or complex serverless applications locally.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 24 — chevron, click, Flask, boto3, jmespath, ruamel_yaml, PyYAML, cookiecutter, aws-sam-translator, docker, dateparser, requests, aws_lambda_builders, tomlkit, watchdog, rich, pyopenssl, jsonschema, typing_extensions, regex, tzlocal, cfn-lint, boto3-stubs, python-dotenv |
| Maintenance | actively maintained — 14 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,349,967/month — #3,113 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_sam_cli-1.165.0-py3-none-any.whl
Keywords: AWS, SAM, CLI
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
aws-lambda-buildersCompiles, builds, and packages AWS Lambda…
permissive · top 5,000 on PyPI
aws-sam-translatorTransforms AWS Serverless Application Model…
permissive · top 1,000 on PyPI
aws-cdk.aws-samProvides AWS CDK v1 constructs for defining…
permissive · top 15,000 on PyPI
mangumMangum adapts ASGI applications to run on AWS…
permissive · top 5,000 on PyPI
chaliceChalice is a Python framework for building and…
permissive · top 15,000 on PyPI
awscliProvides a unified command-line interface to…
permissive · top 1,000 on PyPI
shuffle-sdkShuffle SDK provides a framework for building,…
permissive · top 15,000 on PyPI
fastapi-cloud-cliA command-line tool for deploying and managing…
permissive · top 1,000 on PyPI
awslogsawslogs is a command-line tool for querying and…
permissive · top 15,000 on PyPI
stepfunctionsBuilds and orchestrates machine learning…
permissive · top 15,000 on PyPI