Skip to content

Instantly share code, notes, and snippets.

@asishrs
Created February 1, 2020 06:02
Show Gist options
  • Save asishrs/1ec646f92f0aba877049cb32927d2e98 to your computer and use it in GitHub Desktop.
Save asishrs/1ec646f92f0aba877049cb32927d2e98 to your computer and use it in GitHub Desktop.
ProxyResource:
Type: 'AWS::ApiGateway::Resource'
Properties:
RestApiId: !Ref ApiGatewayRestApi
ParentId: !GetAtt ApiGatewayRestApi.RootResourceId
PathPart: !Ref "apiResourcePath"
ProxyResourceANY:
Type: 'AWS::ApiGateway::Method'
Properties:
RestApiId: !Ref ApiGatewayRestApi
ResourceId: !Ref ProxyResource
HttpMethod: GET
ApiKeyRequired: true
AuthorizationType: NONE
OperationName: !Ref "apiResourcePath"
Integration:
Type: AWS_PROXY
IntegrationHttpMethod: POST
Uri: !Sub 'arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${LambdaFunction.Arn}/invocations'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment