@Alex Thank you for that post and it helped. Here is what I ended up doing.
AMASApiGateway:
Type: "AWS::ApiGateway::RestApi"
Properties:
Name: "amas-api"
Description: "Aggie Mobile Api Service : API"
AMASApiResource:
Type: 'AWS::ApiGateway::Resource'
Properties:
ParentId: !GetAtt AMASApiGateway.RootResourceId
RestApiId: !Ref AMASApiGateway
PathPart: 'unitrans'
AMASApiProxyMethod:
Type: 'AWS::ApiGateway::Method'
Properties:
HttpMethod: GET
ResourceId: !Ref AMASApiResource
RestApiId: !Ref AMASApiGateway
AuthorizationType: NONE
RequestParameters:
method.request.path.proxy: true
Integration:
CacheKeyParameters:
- 'method.request.path.proxy'
RequestParameters:
integration.request.path.proxy: 'method.request.path.proxy'
IntegrationHttpMethod: GET
Type: HTTP_PROXY
Uri: !Sub '<S3 hosted JSON file URI>'
PassthroughBehavior: WHEN_NO_MATCH
IntegrationResponses:
- StatusCode: 200
AMASApiGatewayDeployment:
Type: "AWS::ApiGateway::Deployment"
DependsOn:
- "AMASApiProxyMethod"
Properties:
RestApiId: !Ref AMASApiGateway
StageName: !Ref Environment
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.