AWS Serverless Application Model (AWS SAM) Supports Inline Swagger and AWS CloudFormation Intrinsic Functions

Posted on: Feb 17, 2017

The AWS Serverless Application Model (AWS SAM) has introduced several new updates to improve your serverless application development. AWS SAM extends AWS CloudFormation to provide a simplified syntax for defining the Amazon API Gateway APIs, AWS Lambda functions, and Amazon DynamoDB tables needed by your serverless application. It is available under Apache 2.0.

  • Inline Swagger support (Serverless::Api) – You can now specify Swagger inline using the new definitionBody property instead of having to include a separate Swagger file with your SAM file.
  • New FunctionName property (Serverless::Function) – You can now customize your function’s name with SAM instead of using the default function name created by CloudFormation.
  • Intrinsic functions support – SAM can now resolve a subset of CloudFormation intrinsic functions which allow you to reference resources within your SAM template.
  • Use intrinsic functions to specify URIsCodeUri and DefinitionUri now accept Amazon S3 objects with a Bucket, Key and Version. This means you can now use intrinsic functions to dynamically specify your code or Swagger file’s location.

To learn more about these new features, visit the specification and examples pages on GitHub. Visit our documentation to learn more about deploying serverless applications with SAM.