-
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
Aws::Errors::MissingCredentialsError: unable to sign request without credentials set #1301
Comments
So you're saying that on an EC2 instance, you're seeing this periodically? How is your environment set up? |
Hi @awood45 It happens randomly, What kind of enviroment setting?Ruby 2.3.0 |
Is the Ubuntu version you listed your development environment, or an EC2 AMI? How are you configuring your clients in code? |
It's on the EC2 AMI.
|
BTW, I found a clue.....it's running on my sidekiq worker, it may happen to mult-ithreading? |
Another error message when initialize DynamoDB client |
Okay, it looks like this may be related to how Sidekiq initializes - you might need to do eager_autoload within your Sidekiq workers, rather than only in the Rails initialization. Can you try that? |
For what it's worth, we're working on an overhaul of the SDK which should reduce or eliminate these autoload issues - message definitely received that they cause problems when threading. |
@awood45 I am glad to hear this news. |
Just chiming in here. The preview release of the modularized SDK is coming shortly. With modularization, we have eliminated the use of |
@rayway30419 Are you still experiencing the intermittent missing credential errors? Commonly this is caused by the aggressive defaults in attempting to load credentials from the instance metadata service. Once credentials expire, they must be refreshed, but if the metadata service fails to respond, a missing credentials error is raised. I've just push a small change that will go out with the next release where you can configure expanded retries and timeouts: client = Aws::DynamoDB::Client.new(
region: Aws.config[:region],
instance_profile_credentials_timeout: 5, # defaults to 1 second
instance_profile_credentials_retries: 5, # defaults to 0 retries
) This change will be available in the next release. |
hi @trevorrowe, |
It looks like this went out with a previous release. Let me know/reopen if you see this again after looking at configured retries/timeouts. Thanks! |
@trevorrowe I'm still seeing this issue on (actually coming from fluentd which uses the SDK): Ruby 2.3.4 Is this expected? Could this be eventual consistency, instead of code? |
**Why**: The same AWS error has happened 22 times over the past 7 days in production. According to this issue: aws/aws-sdk-ruby#1301, other people are seeing this intermittently as well. One recommended solution is to allow the client to retry fetching the credentials.
Hi
I use IAM-role to assign policy to my EC2 instance, but sometimes it raise missing credential error.
Aws::Errors::MissingCredentialsError: unable to sign request without credentials set
Does anyone have same problem?
The text was updated successfully, but these errors were encountered: