O'Reilly logo

Cloud Native Architectures by Piyum Zonooz, Erik Farr, Kamal Arora, Tom Laszewski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SAM YAML template

The following is the SAM YAML template for the Weather Service example. It broadly consists of three components:

  • An API Gateway definition that points to the Swagger file for detailed configuration.
  • An AWS Lambda function configuration with a link to code the .zip file, handler name, and runtime environment. In order to link this Lambda function with the API gateway instance, it also has details on the REST API methods and the URI paths, which will be used as triggers to the Lambda function.
  • The final section is around output, which is basically the URI of the API endpoint once the entire stack has been created by SAM:
AWSTemplateFormatVersion: '2010-09-09'Transform: AWS::Serverless-2016-10-31Description: A simple cloud-native ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required