-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Throttling errors after migrating services to aws-sdk-go-v2
#34669
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
This seems broader than controltower. I also have this for Athena:
But also
There seems to be a related open issue at the I'm on aws provider 5.29.0 |
Relates #34409. |
We get similar error with GetInlinePolicyForPermissionSet.
The error exists on aws provider version 5.29.0 and above. |
We are also seeing this with CodePipeline Webhook resources on any version above
|
Same: We cannot use this for managing controls due to a "ThrottlingException" resulting from making the API call to "ListEnabledControls". I just got off the phone with AWS Control Tower folks, who suggested updating the retry logic. It would be great to see a fix for this. |
My thinking on this is to add new provider configuration attribute(s) that will customize the AWS SDK for Go v2 retryer |
We are also facing crippling throttling on method |
@mlynch1985 9at al.) Could you please try setting |
@ewbankkit Thanks for the suggestion, setting that on the provider did work in my case, a plan was generated without those rate limit errors. However, on one of our workspaces that consistently plans in |
@neogibson Thanks for looking into this. |
aws-sdk-go-v2
I tested with this option and unfortunately the error is still present.
|
hashicorp/aws-sdk-go-base#918, incorporated into the Terraform AWS Provider via #35817 should address the |
Unfortunately we are still seeing this issue even with AWS provider version Terraform configuration:
In an earlier comment: they found |
I retested today with TF v.1.7.3 and AWS Provider v5.37.0 but still encountered the same errors. Reverting back to v.5.27.0 continues to be the work around. |
I retested with the 5.37.0 update today after experiencing errors with the 5.36.0 provider, reverted back to the 5.35.0 provider as that throws no errors. |
Yeah we're also experiencing this for CodeBuild. Edit: pinning to 5.27.0 as suggested by @mlynch1985 worked for us. Will test with setting |
FYI, I had some luck changing the provider configuration to include retry_mode = "adaptive" after the update to SDK v2. This resolved the throttling issues I was encountering w/ the Workspaces API. |
For the next pass at a solution, we will add the ability to be able to configure the token bucket capacity for the retry throttling rate limiter (e.g. aws/aws-sdk-go-v2#1665 (comment)). This configured value will be used to initialize the capacity of every API client's token bucket. |
With the very soon to be released v5.38.0 of the Terraform AWS provider we have added a new provider-level configuration parameter provider "aws" {
token_bucket_rate_limiter_capacity = 5000
} which allows the capacity of the rate limiter token bucket to be set. |
I test with the above suggested 5000 and still encountered the error. What is the downside to increasing this value? I don't want to set a ridiculously high number without understanding the potential risks. If it helps, I can setup a code dump so you can test the same code as me. |
@mlynch1985 There are no additional resource consumed by increasing the value. |
@ewbankkit I had to set my provider to 50,000 before it worked, however I was able to complete the plan/apply with this update. I will close this issue now. Thank you! |
We had issues with this over the last few weeks but today it has started to work again and seems to coincide with the update of provider to v5.41.0 Last provider it worked with was v5.38.0 , since then I've been trying some of the suggested workarounds e.g. retry_mode to adaptive and token_bucket_rate_limiter_capacity to a very large number but neither helped. We'll keep an eye on it. |
Fixed for us in v5.42.0, specifically looks like this fix:
|
We still facing some issues related to this, we noticed a strange behavior where the TF plan during the |
Thanks for fixing this! |
@AbAvramidis Do you know which services are exhibiting this behavior? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform Core Version
1.6.4
AWS Provider Version
5.28.0
Affected Resource(s)
aws_controltower_control
Expected Behavior
The Terraform plan should complete the refresh process successfully without error and allow for the apply stage to execute.
Actual Behavior
The refresh was interrupted due to the throttling errors preventing the plan/apply from completing.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Setup AWS Control Tower and copy the above code into main.tf. You will need to create the OU Structure and enable CT Controls to OU associations as it seems to throttle after the initial apply.
Debug Output
No response
Panic Output
No response
Important Factoids
After upgrading to AWS provider v5.28.0 and attempting to execute a plan/apply containing 10+ instances of the "aws_controltower_control" resource, we received throttling errors. When adding a constraint to the provider block to downgrade the AWS provider to <5.28.0 the issue is resolved. Alternatively we can pass in the -refresh=false switch to complete the apply successfully.
References
[Enhancement]: Migrate controltower service to aws-sdk-go-v2
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: