Skip to content

Instantly share code, notes, and snippets.

@brianleroux
Last active December 8, 2019 02:38
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 brianleroux/7602edc1d11bb440211d837b5a247978 to your computer and use it in GitHub Desktop.
Save brianleroux/7602edc1d11bb440211d837b5a247978 to your computer and use it in GitHub Desktop.
playing around w HTTP apis for API Gateway…try saying that three times fast

create a $default route lambda

run sam deploy --template-file sam.yaml --stack-name Hi --capabilities CAPABILITY_IAM to see the default route…the invoke persmission will be invalid but even brute forcing it fails

AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS SAM template with a simple API definition
Resources:
ApiFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
InlineCode: "exports.handler = async function() {return {body: 'Hello World!', headers: {'content-type': 'text/html'}}}"
Runtime: nodejs10.x
Events:
ApiEvent:
Type: HttpApi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment