I am new to cloudformation, I am trying to follow the AWS doc to create a Usage Plan with Method throttling. I need to define an ApiStage with Throttle attribute.
I tried below approach but got an error - Value of property Throttle must be an object with String (or simple type) properties
ApiUsagePlan:
Type: "AWS::ApiGateway::UsagePlan"
Properties:
Throttle:
RateLimit: 10
BurstLimit: 10
ApiStages:
- ApiId: !Ref ApiGatewayApi
Stage: !Ref ApiStage
Throttle: -------> how to define this property?
RateLimit: 5
BurstLimit: 5
You need to specify path and method to be throttled. For example:
ApiStages:
- ApiId: !Ref ApiGatewayApi
Stage: !Ref ApiStage
Throttle:
"/helloworld/ANY":
BurstLimit: 5
RateLimit: 5
Where /helloworld/ANY
must be replaced by your own path and method.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With