aws-sdk-ruby: Aws::Errors::MissingCredentialsError: unable to sign request without credentials set

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?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 19
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@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.

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.

@trevorrowe I’m still seeing this issue on (actually coming from fluentd which uses the SDK):

Ruby 2.3.4 AWS SDK 2.7.0 Linux Kernel 4.9.41

Is this expected? Could this be eventual consistency, instead of code?