-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[apigateway] Throttling per method not set when value=0 #10071
Comments
I downloaded aws-cdk repo and removed the conditional, i.e modify renderThrottle method and leave it as:
Unit tests pass and now the resultant cloudformation is correct. I can create a PR if needed. Any idea of why is that condition in the code? The values are already validated using validateInteger function... |
I created a branch with this change and a unit test that fails with the original version, it's my first PR so I left it as Draft |
This looks like the correct fix. Thanks @cyuste for creating a PR. |
PR ready for review :) |
When we create a throttling for a method with rate and burst limits set to 0 we expect to have that method configured to allow 0 requests (disabled) as it happens using aws console, but in cdk the throttling is not configured causing the method to use global values
Reproduction Steps
Create an API Gateway and assign to an usage plan a throttling per method set to 0:
What did you expect to happen?
A new throttling per method is created for the specified method with rate and burst set to 0
What actually happened?
No throttling is configured for that method. In the cloudformation that throttling is described as:
It should contain BurstLimit and RateLimit set to 0.
Environment
Other
I think that the problem is in this condition
As 0 is considered false an thus undefined
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: