Introduction to testing with the sam local command - 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).

Introduction to testing with the sam local command

Use the Amazon Serverless Application Model Command Line Interface (Amazon SAM CLI) sam local command to test your serverless applications locally.

For an introduction to the Amazon SAM CLI, see What is the Amazon SAM CLI?.

To use sam local, install the Amazon SAM CLI by completing the following:

Before using sam local, we recommend a basic understanding of the following:

Using the sam local command

Use the sam local command with any of its subcommands to perform different types of local testing for your application.

$ sam local <subcommand>

To learn more about each subcommand, see the following: