AWS Serverless Application Model
The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications. It provides shorthand syntax to express functions, APIs, databases, and event source mappings. With just a few lines per resource, you can define the application you want and model it using YAML. During deployment, SAM transforms and expands the SAM syntax into AWS CloudFormation syntax, enabling you to build serverless applications faster.
To get started with building SAM-based applications, use the AWS SAM CLI. SAM CLI provides a Lambda-like execution environment that lets you locally build, test, and debug applications defined by SAM templates. You can also use the SAM CLI to deploy your applications to AWS.
Getting Started with SAM
Install SAM CLI
Single Deployment Configuration
Use SAM to organize related components, share configuration such as memory and timeouts between resources, and deploy all related resources together as a single, versioned entity.
Integration with Development Tools
SAM integrates with a suite of AWS serverless tools. Find new applications in the AWS Serverless Application Repository, use AWS Cloud9 IDE to author, test, and debug SAM-based serverless applications, and AWS CodeBuild, AWS CodeDeploy, and AWS CodePipeline to build a deployment pipeline. To start with a project structure, code repository, and CI/CD pipeline configured for you, try AWS CodeStar.
Local Testing and Debugging
Use SAM CLI to step-through and debug your code. It provides a Lambda-like execution environment locally and helps you catch issues upfront.
Built on AWS CloudFormation
AWS SAM is an extension of AWS CloudFormation, so you get the reliable deployment capabilities of CloudFormation. You can also define resources using CloudFormation in your SAM template and use the full suite of resources, intrinsic functions, and other template features that are available in AWS CloudFormation.
Built-In Best Practices
Deploy your infrastructure as config to leverage best practices such as code reviews. Enable gradual deployments through AWS CodeDeploy and tracing using AWS X-Ray with just a few lines of SAM config.
What's New with SAM
Contribute to SAM
Make pull requests, report bugs, and share ideas to improve the full AWS SAM template specification
Add new commands or enhance existing ones, report bugs, and improve documentation for the SAM CLI
Ask questions, give answers, and contribute to the development of AWS SAM on Slack