refile / refile-s3

Amazon S3 Backend for Refile
MIT License
36 stars 88 forks source link

fix deprecated call to Aws::CredentialProvider access_key_id #18

Open PlugIN73 opened 8 years ago

PlugIN73 commented 8 years ago

This @s3.client.config.credentials is SharedCredentials, which included methods from CredentialProvider: http://docs.aws.amazon.com/sdkforruby/api/Aws/CredentialProvider.html#access_key_id-instance_method

Instead this methods, we must use this methods from Credentials module: http://docs.aws.amazon.com/sdkforruby/api/Aws/Credentials.html#access_key_id-instance_method

PlugIN73 commented 8 years ago

to issue #18

trendwithin commented 8 years ago

By chance is this related to the following error I'm getting when I start up the server?

/usr/local/lib/ruby/gems/2.2.0/gems/refile-s3-0.2.0/lib/refile/s3.rb:43:in `initialize': missing keywords: region, bucket (ArgumentError)
PlugIN73 commented 8 years ago

@trendwithin you just did't configure params region, bucket You need do like this:

Refile::S3.new(your_current_params, region: "eu-west-1", bucket: "my_s3_bucket")
trendwithin commented 8 years ago

Thanks for the reply. I was able to pinpoint the error I made. I was following the set-up example a tad too literally and made the mistake of:

Refile.cache = Refile::S3.new(prefix: "cache", **aws)
Refile.cache = Refile::S3.new(max_size: 10.megabytes)
Refile.store = Refile::S3.new(prefix: "store", **aws)

instead of

 Refile.cache = Refile::S3.new(prefix: "cache", max_size: 10.megabytes, **aws)
 Refile.store = Refile::S3.new(prefix: "store", **aws)   
PlugIN73 commented 8 years ago

@jnicklas what do you think?

crhonox commented 2 years ago

Anyone managed to use iam roles credential in a ecs container?