ruby on rails - Fog issue using iam profile and fetching urls from aws -


using fog w/ aws instance profiles , after 3 day s3 urls no longer working. i'm getting fresh urls, error returned aws provided token has expired. restarting application gets working again, no errors other 1 aws present.

i have read switching keys should fix issue, hoping keep iam profile. has run this?

my carrierwave config bellow , using carrierwave version 0.9.0 , fog 1.28.0

carrierwave.configure |config|   fog_credentials = {     :provider               => 'aws',     :region                 => 'us-east-1',     :path_style             => true,     :host                   => 's3-external-1.amazonaws.com'    # routes requests northern virginia datacenter   }    if defined?(settings.use_iam_profile) && settings.use_iam_profile     fog_credentials[:use_iam_profile] = true   else     fog_credentials[:aws_access_key_id] = settings.s3_access_key     fog_credentials[:aws_secret_access_key] = settings.s3_secret_key   end    config.fog_credentials = fog_credentials   config.fog_directory  = settings.s3_bucket_name                 # required   config.fog_public     = false                                   # optional, defaults true   config.root = file.join(rails.root, 'private') end 

so link got updated, issue while signing token being refreshed correctly when downloading files fog, wasn't being refreshed when signing s3 url.

there pull request made on fog fix issue


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -