Forbidden Error when Uploading via Rails ActiveStorage
I'm trying to migrate storage on my rails app away from Amazon to Linode Object Storage. I'm getting a error when sidekiq attempts to push objects.
error
ActiveStorage::AnalyzeJob
"gid://we-vote/ActiveStorage::Blob/1338"
Aws::S3::Errors::Forbidden: Aws::S3::Errors::Forbidden
storage.yml
linode:
service: s3
endpoint: https://us-iad-10.linodeobjects.com
access_key_id: <%= ENV['LINODE_ACCESS_KEY_ID'] %>
secret_access_key: <%= ENV['LINODE_SECRET_ACCESS_KEY'] %>
region: default
bucket: mybucket
linode_mirror:
service: Mirror
primary: linode
mirrors:
- local
1 Reply
While I'm not super familiar with Rails ActiveStorage, I did find a guide on a third-party site that walks through how to set this up on the Linode/Akamai Platform:
https://martinwood.org/getting-started-with-linode-object-storage-on-rails
Between that guide and your code snippets, I noticed some differences in the access_key_id
, secret_access_key
and an additional field called public
with a value of true
that might be worth testing/looking into as potential causes for your error here.
I also noticed they mention in that same guide guide how to configure the ActiveStorage service, which you would definitely want to compare to how yours is set up.
If all else fails, I found a pretty active Rails community over on reddit: https://www.reddit.com/r/rails/
I hope that helps!
-Micah