serverless-aws-alias
serverless-aws-alias copied to clipboard
Template format error: Unresolved resource dependencies [ApiGatewayDeployment1570755540682] in the Resources block of the template
Since the plugin create deployment in the separate cloudformation stack I get an error on the following code in the serverless.yaml
Resources:
MyServiceUsagePlan:
Type: "AWS::ApiGateway::UsagePlan"
DependsOn: ApiGatewayDeployment${sls:instanceId} # https://serverless.com/framework/docs/providers/aws/guide/variables/
Properties:
UsagePlanName: !Sub "${self:service}-${self:provider.stage}"
ApiStages:
- ApiId:
Ref: ApiGatewayRestApi
Stage: ${self:provider.stage}
Quota:
Limit: 500000
Period: MONTH
Throttle:
BurstLimit: 200
RateLimit: 100
MyServiceUsagePlanKey:
Type: "AWS::ApiGateway::UsagePlanKey"
DependsOn: MyServiceUsagePlan
Properties :
KeyId: ${self:provider.KeyId}
KeyType: API_KEY
UsagePlanId:
Ref: MyServiceUsagePlan
How can I use a custom ApiKey and Custom Usage Plan for APIGW and it's stages with this plugin then?