Skip to content
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

S3 store failing when used with IAM #12

Closed
volkanunsal opened this issue Oct 21, 2014 · 5 comments
Closed

S3 store failing when used with IAM #12

volkanunsal opened this issue Oct 21, 2014 · 5 comments

Comments

@volkanunsal
Copy link

I have been trying to configure this gem with IAM profiles. As per instructions in the README, I have set up my dragonfly.rb like so:

datastore :s3,
      use_iam_profile: true,
      bucket_name: ENV['S3_BUCKET']

(Removed the access key and the secret.)

But in the production, I get the following error:

[fog][WARNING] Unable to fetch credentials: Connection refused - connect(2) for 169.254.169.254:80 (Errno::ECONNREFUSED)
  ArgumentError (Missing required arguments: aws_access_key_id, aws_secret_access_key):

Am I doing this right?

@benpickles
Copy link

Sorry for the silly question but are you uploading from an EC2 instance?

@volkanunsal
Copy link
Author

No, I was testing from my own computer.

@volkanunsal
Copy link
Author

The production error was happening on Heroku.

@benpickles
Copy link

You would need to own the particular EC2 instance to use IAM in that way (automatic authorisation to other AWS services).

I am using IAM to restrict a Dragonfly-specific AWS user to a specific S3 bucket - :access_key_id and :secret_access_key are still required to authorise the user.

@HeathNaylor
Copy link

Then we need to update the README correct? It states this:

:use_iam_profile      # boolean - if true, no need for access_key_id or secret_access_key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants