-
Notifications
You must be signed in to change notification settings - Fork 1.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
429 / too many requests API error reported as missing credentials #2823
Comments
What do you mean by "hammer the credentials endpoint with valid credentials"? Can you provide any code to reproduce the issue? What service and operation are you trying to use and how are you constructing a client? |
from rails, from an AWS instance, with credentials from the instance
reproduces the error for me. sometimes I have to futz with the number (2000? 3000?) to consistently reproduce. |
In general you should only be creating a single client - the AWS service clients are thread safe and can safely be shared and re-used across your application. The If you know the type of credentials your application needs ahead of time, you can explicitly check and configure them. |
Yup -- the issue is not at all blocking. Just when we got the error it was misleading. |
Yeah - thats fair - getting to the root cause issue there is difficult. I'll look into the possibility of adding some logging for such failures. |
What if I create 100 or more AWS S3 clients instead of a single client? I'm asking because I want to know more about creating S3 clients. |
There is some overhead in creating a client, so its generally recommended to create only a single client (per set of configuration options) and share it across your application. When you create a service client, it will attempt to resolve all of the configuration options. For credentials (unless credentials are explicitly provided) it uses the credential provider chain, which will check each credential provider in order until one of them is able to resolve credentials. With the |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
When performing too many requests, the ruby error surfaced says
but the underlying failed http request fails with a 429 error
Expected Behavior
The error raised would be something related to the underlying 429 error (instead of pointing to wrong credentials)
Current Behavior
The error raised is a
Aws::Sigv4::Errors::MissingCredentialsError
Reproduction Steps
hammer the credentials endpoint with valid credentials
Possible Solution
bubble through the 429 error or wrap the 429 error in a 429-themed error.
Additional Information/Context
No response
Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
aws-sdk-s3
Environment details (Version of Ruby, OS environment)
ruby 3.1, debian bullseye, x86-64
The text was updated successfully, but these errors were encountered: