Created
September 27, 2018 15:45
-
-
Save housni/967d7d05c41d3565888c95a2b18b18be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Parameters: | |
HTTPResponse: | |
Type: Number | |
Default: 302 | |
AllowedValues: [301, 302] | |
Description: "The HTTP response status code." | |
NewDomain: | |
Type: String | |
Description: "New domain to redirect to." | |
Resources: | |
GetFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Description: "Handles GET requests." | |
Handler: get.handler | |
Runtime: nodejs6.10 | |
CodeUri: ./lambda | |
Environment: | |
Variables: | |
NEW_DOMAIN: !Ref NewDomain | |
HTTP_RESPONSE: !Ref HTTPResponse | |
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