Type: AWS::Serverless::Api
Properties:
StageName: test
DefinitionUri: swagger.json
Type: AWS::ApiGateway::UsagePlan
Properties:
ApiStages:
-
ApiId: !Ref MyApiResource
Stage: test
Throttle:
BurstLimit: 500
RateLimit: 50
UsagePlanName:
Fn::Join: [
"_",
[
"UsagePlan",
!Ref "AWS::Region",
!Ref "AWS::StackName"
]
]
If I run the cloud formation script it fails to create the UsagePlan with an error saying the stage test does not exist on the API.
If I instead comment out the usage plan and run the script and then run it again with the API and the usage plan enabled it will create the usage plan and link it to the stage properly.