Skip to content

Instantly share code, notes, and snippets.

@em-shea
Created May 12, 2020 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save em-shea/d328fe0baca2c33f787d35d0bfe7c91e to your computer and use it in GitHub Desktop.
Save em-shea/d328fe0baca2c33f787d35d0bfe7c91e to your computer and use it in GitHub Desktop.
An example SAM template for a Lambda function invoked by API Gateway
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An example SAM template for a Lambda function invoked by API Gateway.
Resources:
MyFunction:
Type: 'AWS::Serverless::Function'
Properties:
FunctionName: MyFunction
Handler: MyFunction.lambda_handler
Runtime: python3.7
CodeUri: ./MyFunction
Description: A function that is invoked by API Gateway.
Events:
MyApi:
# An API Gateway endpoint that responds to HTTP GET
Type: Api
Properties:
Path: /
Method: GET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment