AWS CloudFormation Supports AWS Serverless Application Model, AWS Lambda Environment Variables, and New CLI Commands

You can now provision and manage resources for AWS Lambda-based applications using AWS CloudFormation and the AWS Serverless Application Model (AWS SAM). SAM helps you more effectively model, package, and deploy “serverless” applications which use services like AWS Lambda, Amazon DynamoDB, and Amazon API Gateway. SAM is a specification for describing Lambda-based applications and offers a syntax designed specifically for expressing serverless resources. Learn more about SAM here.

To get started, you model your serverless resources in a CloudFormation template using SAM syntax, specify serverless in the Transform section of your template, and then use change sets to preview and create the stack.

You can now also use new AWS CLI commands for package and deploy, which simplify the process of uploading source code from your local drive and creating your resources. For example, you can use the package command to upload source code for Lambda functions, API Gateway Swagger files, or AWS Elastic Beanstalk applications.

CloudFormation has also introduced the following updates:

AWS Lambda environment variables: Set environment variables for Lambda functions.
Amazon SNS subscriptions: Subscribe an endpoint to an SNS topic.