Skip to content

Instantly share code, notes, and snippets.

@housni
Created September 27, 2018 15:40
Show Gist options
  • Save housni/2d1f98e7ee87df2975d9e62b01404e82 to your computer and use it in GitHub Desktop.
Save housni/2d1f98e7ee87df2975d9e62b01404e82 to your computer and use it in GitHub Desktop.
---
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
GetFunction:
Type: AWS::Serverless::Function
Properties:
Description: "Handles GET requests."
Handler: get.handler
Runtime: nodejs6.10
CodeUri: ./lambda
Environment:
Variables:
NEW_DOMAIN: "http://example.org"
HTTP_RESPONSE: 301
Events:
GetProxy:
Type: Api
Properties:
Path: /{proxy+}
Method: get
GetCustom:
Type: Api
Properties:
Path: /
Method: get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment