-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Enabling data trace on aws_apigatewayv2_stage prevent endpoint to be reached with 429 too many request error #14742
Comments
@rlapray Thanks for raising this issue. |
Interestingly, once you select Enable throttling on an API stage in the console and save and next deselect that check box and save then the console attempt to send values of |
@ewbankkit First thank you for your interest in this bug !
Yes, in fact i can think of one : as a practitioner i would want to stop any incoming request to my stage endpoints in a few seconds with a simple fix like throttling to 0 accepted requests per second. It's not conventional, but brutally effective and really quick to setup 😄
Yes absolutely ! You have to destroy the stage and recreate it correctly, i didn't find any other way either ! As for a solution, and as you mentioned, |
Hello again ! Does any prioritization had been done around this issue ? As stated before, setting a default route settings will axe the websocket silently. |
Couple of notes to add to this;
# aws_apigatewayv2_stage.v1 will be updated in-place
~ resource "aws_apigatewayv2_stage" "v1" {
// omitted state
~ default_route_settings {
data_trace_enabled = false
detailed_metrics_enabled = false
- throttling_burst_limit = 100 -> null
- throttling_rate_limit = 100 -> null
}
} For what it's worth, the API Docs don't seem to actually mention how to handle this, apart from being signed int/floats. |
Is there any update on the status of this item? I've resorted to setting limits to the account max (5,000 & 10,000) to get around it for now. |
Basically guys you need to validate your schema for null values there, somehow casting to int makes 0 from null |
If the AWS API is a blocker, would it be reasonable to add a warning to the Terraform docs in the meantime? |
FWIW, I hit this issue as well and approached AWS support on the issue. Their response:
More info: https://stackref.substack.com/p/psa-aws-api-gateway-429-errors-and?s=r |
Hello!
Workaround to avoid unexpected unreachable API is to add add the default setting for throttling as mentioned by @spidermonk |
Interestingly, the Lambda (functions?) UI shows a warning when throttling rates are set to 0 but API Gateway does not. I've made a request of our TAM to support that in addition to raising the issue discussed in here. My ask was that: |
I stumbled across this after raising the comment at #30373 (comment) On the TF side - it feels wrong that if you set a value like re:
|
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
When not setting or setting to
null
throttling_burst_limit
andthrottling_rate_limit
indefault_route_settings
, I'm expecting these properties to benull
.When theses properties are set to
null
, there is no throttling of any kind on my websocket api gateway.Actual Behavior
throttling_burst_limit
andthrottling_rate_limit
are set to0
instead ofnull
, and the throttling even prevent me to connect to my websocket endpoint, with a 429 (too many request) error.Steps to Reproduce
default_route_settings
. The planner produce the following plan :default_route_settings
to my stage:throttling_burst_limit
andthrottling_rate_limit
the planner output is exactly the same :wscat -c wss://**********.execute-api.eu-west-3.amazonaws.com/ws
=>error: Unexpected server response: 429
Important Factoids
If I just want logs on my websocket api gateway, the mere fact of creating a default_route_settings and set data_trace_enabled to true in my stage prevent me to access my websocket api gateway with a 429 error.
The text was updated successfully, but these errors were encountered: