How to use Amazon Serverless Application Model (Amazon SAM) - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

How to use Amazon Serverless Application Model (Amazon SAM)

The primary tools you use to develop your application are the Amazon SAM CLI and the Amazon SAM template and Amazon SAM project (which is your application project directory). You use these tools to:

  1. Develop your application (this includes initializing your application, defining your resources, and building your application).

  2. Test your application.

  3. Debug your application.

  4. Deploy your application and resources.

  5. Monitor your application.

Amazon SAM creates your Amazon SAM project after you run the sam init command and complete its subsequent workflow. You define your serverless application by adding code to your Amazon SAM project. While your Amazon SAM project consists of a set of files and folders, the most important file in it is your Amazon SAM template (named template.yaml). In this template, you write your code to express resources, event source mappings, and other properties that define the your serverless application.

The Amazon SAM CLI contains a repository of commands you use on your Amazon SAM project. More specifically, the Amazon SAM CLI is what you use to build, transform, deploy, debug, package, initialize, and sync your Amazon SAM project. In other words, it’s what you use to turn your Amazon SAM project into your serverless application.