Dear Serverless, I have API Gateway Proxy configuration in serverless.yml. Stage caching is successfully turned on. But I cannot enable caching on Integration Request -> Url Path Parameters -> caching in serverless.yml file. Here is my config (a part):
resources:
Resources:
ProxyResource:
Type: AWS::ApiGateway::Resource
Properties:
ParentId: !GetAtt ApiGatewayRestApi.RootResourceId
RestApiId: !Ref ApiGatewayRestApi
PathPart: '{proxy+}'
RootMethod:
Type: AWS::ApiGateway::Method
Properties:
ResourceId: !GetAtt ApiGatewayRestApi.RootResourceId
RestApiId: !Ref ApiGatewayRestApi
AuthorizationType: NONE
HttpMethod: ANY
Integration:
Type: HTTP_PROXY
IntegrationHttpMethod: ANY
Uri: ${self:custom.backendUrls.${self:provider.stage}}
PassthroughBehavior: WHEN_NO_MATCH
ProxyMethod:
Type: AWS::ApiGateway::Method
Properties:
ResourceId: !Ref ProxyResource
RestApiId: !Ref ApiGatewayRestApi
AuthorizationType: NONE
HttpMethod: ANY
RequestParameters:
method.request.path.proxy: true
Integration:
Type: HTTP_PROXY
IntegrationHttpMethod: ANY
Uri: ${self:custom.backendUrls.${self:provider.stage}}/{proxy}
PassthroughBehavior: WHEN_NO_MATCH
RequestParameters:
integration.request.path.proxy: 'method.request.path.proxy'
CacheKeyParameters:
- method.request.path.proxy
This Api Gateway is only proxy. Of course I can deploy it to AWS and enable the caching on Integration request manually, but would like have that fully automatic.
Thanks for having a look.