0

site deployed in aws elastic beantalk

aws.yml

 production:
  access_key_id: 123333231331....
  secret_access_key: 12212dddddd........

production.rb

  config.paperclip_defaults = {
  :storage => :s3,
  :preserve_files => true,
  :s3_credentials => 'aws.yml',
  :s3_region => 'ap-south-1',
  :s3_host_name => 's3.ap-south-1.amazonaws.com',
  :bucket => 'xxxxxx'
}

I also give public access permissions in s3 bucket.

anyone: read write

gem...

gem 'aws-sdk', '~> 2.10', '>= 2.10.85'

aws.yml folder within config folder -- config/aws.yml

Ganesh Raju
  • 95
  • 1
  • 14

1 Answers1

0

Looks like the application is not finding your S3 credentials file. In your production.rb, try giving it the full path to the file:

:s3_credentials => "#{Rails.root}/config/aws.yml"
Tom Copeland
  • 1,221
  • 10
  • 10