What is the AWS Serverless Application Model (AWS SAM)?

The AWS Serverless Application Model (AWS SAM) is an open source framework for building serverless applications. It provides shorthand syntax to express functions, APIs, databases, and event source mappings. You define the application you want with just a few lines per resource and model it using YAML.

How does AWS SAM work?

AWS SAM provides shorthand syntax to express functions, APIs, databases, and event source mappings. During deployment, SAM transforms and expands the SAM syntax into AWS CloudFormation syntax. Then, CloudFormation provisions your resources with reliable deployment capabilities.

Is AWS SAM open-source?

AWS SAM and the SAM CLI are open-sourced under the Apache 2.0 license. You can contribute new features and enhancements to AWS SAM on GitHub or the AWS SAM CLI on GitHub.

How much does AWS SAM cost to use?

There is no additional charge to use AWS SAM. You pay for the AWS resources created using SAM in the same manner as if you created them manually. You only pay for what you use, as you use it. There are no minimum fees and no required upfront commitments.

Which languages does AWS SAM support?

You can use AWS SAM to build serverless applications that use any runtime supported by AWS Lambda. You can also use SAM CLI to locally debug Lambda functions written in Node.js, Java, Python, and Go.

Which AWS regions support AWS SAM?

AWS SAM is available in all regions where AWS Lambda is available. To learn more, see the AWS Lambda region table.

What is AWS SAM CLI?

The SAM Command Line Interface (CLI) lets you locally build, test, and debug serverless applications defined by AWS SAM templates. SAM CLI provides a Lambda-like execution environment locally and helps you catch issues upfront. 

How do I install AWS SAM CLI?

You can install AWS SAM CLI on Linux, Mac, or Windows using pip. To get started, visit our installation documentation


What is a SAM template?

A SAM template file is a YAML configuration that represents the architecture of a serverless application. You use the template to declare all of the AWS resources that comprise your serverless application in one place. AWS SAM templates are an extension of AWS CloudFormation templates, so any resource that you can declare in an AWS CloudFormation template can also be declared in an AWS SAM template. Learn more

How do I get started with AWS SAM?

To get started with SAM, install the AWS SAM CLI and use the sam init command to generate a pre-configured AWS SAM template with sample application code. For a guided walk-through on building a serverless application using AWS SAM, try this quick start

What can I do with AWS SAM CLI?

The AWS SAM CLI is a command-line interface that supports building SAM-based applications. With the AWS SAM CLI, you can invoke Lambda functions locally, create a deployment package for your serverless application, and deploy your serverless application to the AWS Cloud.

SAM CLI supports a growing number of commands. The sam init command generates pre-configured AWS SAM templates along with example application code in the language of your choice. The sam local command supports local invocation and testing of your Lambda functions and SAM-based serverless applications by executing your function code locally in a Lambda-like execution environment. You can also use the sam local command to generate sample payloads locally, start a local endpoint to test your APIs, or automate testing of your Lambda functions. The sam package and sam deploy commands let you bundle your application code and dependencies into a “deployment package" and then deploy your serverless application to the AWS Cloud. Finally, the sam logs command enables you to fetch, tail, and filter logs for Lambda functions. 

AWS SAM is open-source. Contribute! 

Find AWS SAM on GitHub
Have more questions?
Contact us