1
votes

Getting below error while uploading image through paperclip in ROR.

AWS::S3::Errors::AccessDenied Access Denied

Below is the s3 settings:

:default_url => "/assets/:style/dummy.png",
:storage => :s3,
:s3_credentials => "s3.yml",
:path => "/user/:id/:style/:filename",
:url => ":s3_domain_url",
:s3_region => 'us-east-1'

s3.yml setting:

development:
bucket: my_bucket_name
access_key_id: 'access_key'
secret_access_key: 'secret_key'

any workaround for this error?

1

1 Answers

0
votes

I suspect this is due to the permissions you have on the files stored in the bucket. If you log into the Amazon S3 management console you can find the directory or file and grant permissions to everyone for open/download. Assuming that's what you want for the dummy.png