Posted On: May 25, 2018

The Amazon Serverless Application Model (SAM) Command Line Interface (CLI), also referred to as SAM Local, lets you locally build, test, and debug serverless applications defined by Amazon SAM templates. Now, you can use the SAM init command to initialize a ready-to-deploy SAM application in your preferred runtime.  

The new SAM init command creates an application with sample code, unit tests, and the SAM template itself. It also allows you to initialize SAM applications using a custom structure so you can standardize them across teams and organizations. To learn more about using the SAM init command, visit our documentation.

SAM CLI now uses the recently open-sourced SAM implementation, which enables you to leverage any new SAM functionality immediately after release. With this release, the SAM validate command allows you to locally identify any syntax errors before you deploy an application to production. SAM templates that pass the SAM validate command will also pass validation when deployed using Amazon CloudFormation. 

To get started with SAM CLI, install it using the command: pip install aws-sam-cli. You can also use SAM CLI with IDEs like Visual Studio Code and Eclipse.  

To learn more about building, testing, and deploying serverless applications using SAM CLI, visit our documentation and the code repository on GitHub. You can also contribute to SAM development by joining the active SAM community on Slack.