Join the SAM developers channel (#samdev) on Slack to collaborate with fellow community members and the AWS SAM team.
sam
is the AWS CLI tool for managing Serverless applications written
with AWS Serverless Application Model
(SAM). SAM CLI
can be used to test functions locally, start a local API Gateway from a
SAM template, validate a SAM template, fetch logs, generate sample
payloads for various event sources, and generate a SAM project in your
favorite Lambda Runtime.
- Develop and test your Lambda functions locally with
sam local
and Docker - Invoke functions from known event sources such as Amazon S3, Amazon DynamoDB, Amazon Kinesis Streams, etc.
- Start local API Gateway from a SAM template, and quickly iterate over your functions with hot-reloading
- Validate SAM templates
- Get started with boilerplate Serverless Service in your chosen
Lambda Runtime
sam init
Learn how to get started using the SAM CLI with these guides:
- Installation: Set up your macOS, Linux or Windows Machine to run serverless projects with SAM CLI.
- Introduction to SAM and SAM CLI What is SAM and SAM CLI, and how can you use it to make a simple hello-world app.
- Running and debugging serverless applications locally: Describes how to use SAM CLI for invoking Lambda functions locally, running automated tests, fetching logs, and debugging applications
- Packaging and deploying your application: Deploy your local application using an S3 bucket, and AWS CloudFormation.
- Advanced: Learn how to work with compiled languages (such as Java and .NET), configure IAM credentials, provide environment variables, and more.
- Examples
- Python Versions support
- Python 2.7
- Python 3.6
- Python 3.7
- Supported AWS Lambda Runtimes
-
nodejs
-
nodejs4.3
-
nodejs6.10
-
nodejs8.10
-
java8
-
python2.7
-
python3.6
-
python3.7
-
go1.x
-
dotnetcore1.0
-
dotnetcore2.0
-
dotnetcore2.1
-
ruby2.5
-
Provided
-
- AWS credential support
- Debugging support
- Inline Swagger support within SAM templates
- Validating SAM templates locally
- Generating boilerplate templates
-
nodejs
-
nodejs4.3
-
nodejs6.10
-
nodejs8.10
-
java8
-
python2.7
-
python3.6
-
python3.7
-
go1.x
-
dotnetcore1.0
-
dotnetcore2.0
-
ruby2.5
-
Provided
-
Contributions and feedback are welcome! Proposals and pull requests will be considered and responded to. For more information, see the CONTRIBUTING file.
SAM CLI uses the open source docker-lambda Docker images created by @mhart.