The AWS Serverless Application Model (AWS SAM) is a model to define serverless applications. AWS SAM is natively supported by AWS CloudFormation and defines a simplified syntax for expressing serverless resources. You simply define the resources you need as part of your application in the template file and create a CloudFormation stack with the SAM deploy command.
Previously, we saw how AWS SAM can be used to locally test your Lambda function. In addition, SAM can be used to design and deploy your function to AWS Lambda. You can initialize a quick Go-based serverless project (a boilerplate) with the following command:
sam init --name api --runtime go1.x
The preceding command will create a folder with the following structure:
The sam init command provides a quick way to create a serverless application. It generates a simple Lambda function in Go with...