How to use AWS Serverless Application Model (AWS SAM) - AWS Serverless Application Model

How to use AWS Serverless Application Model (AWS SAM)

The primary tools you use to develop your application are the AWS SAM CLI and the AWS SAM template and AWS 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.

AWS SAM creates your AWS SAM project after you run the sam init command and complete its subsequent workflow. You define your serverless application by adding code to your AWS SAM project. While your AWS SAM project consists of a set of files and folders, the most important file in it is your AWS 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 AWS SAM CLI contains a repository of commands you use on your AWS SAM project. More specifically, the AWS SAM CLI is what you use to build, transform, deploy, debug, package, initialize, and sync your AWS SAM project. In other words, it’s what you use to turn your AWS SAM project into your serverless application.