Created
October 3, 2019 14:07
-
-
Save tkeeber/d224d654257679ae9cbff33ea4ae5b9f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ApiGateway: | |
Type: AWS::ApiGateway::RestApi | |
Properties: | |
EndpointConfiguration: | |
Types: | |
- 'REGIONAL' | |
Body: | |
swagger: '2.0' | |
info: | |
version: 'v1' | |
title: !Ref AWS::StackName | |
paths: | |
/newapi: | |
post: | |
responses: | |
'202': | |
description: Accepted | |
headers: | |
Access-Control-Allow-Origin: | |
type: 'string' | |
Access-Control-Allow-Methods: | |
type: 'string' | |
Access-Control-Allow-Headers: | |
type: 'string' | |
x-amazon-apigateway-integration: | |
type: 'AWS_PROXY' | |
httpMethod: 'POST' | |
uri: !Sub 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyLambda.Arn}/invocations' | |
responses: | |
default: | |
statusCode: '202' | |
responseParameters: | |
method.response.header.Access-Control-Allow-Methods: "'OPTIONS,POST'" | |
method.response.header.Access-Control-Allow-Headers: "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'" | |
method.response.header.Access-Control-Allow-Origin: "'*'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment