Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon S3 bucket images return 403 error

I've just inherited a rails site hosted on heroku using S3 for storage of images uploaded with the paperclip gem and suddenly most images are returning 403 errors. Looking at the bucket through the management console, I don't see the files listed even.

The images are uploaded through the ckeditor wysiwyg plugin, and it looks like they should be inside a folder named 'rich', but no such folder exists within the bucket. Not all files are missing (though some that were throwing a 403 are now showing up on the site correctly without me having done anything I can think of to change that), but none of them are listed in the management console.

I'm unfamiliar with S3 and not sure how to diagnose let alone resolve this issue. Any suggestions on steps I can do to figure out what the problem is would be appreciated, thanks.

like image 827
aperture Avatar asked Dec 07 '25 05:12

aperture


1 Answers

Every time I've seen this error, it has been permissions:

  1. Triple-check your AWS Access_key, Secret_key, and REGION

If you have any doubt about the keys, regenerate a new set to be sure you are using the correct keys.

  1. If you end up changing any of them, remember to restart your server to re-read the values.
like image 103
Dave Collins Avatar answered Dec 09 '25 19:12

Dave Collins



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!