I am building a web app in Rails 5, Ruby 2.4.0 and using the AWS-SDK Gem along with Shrine gem.
Currently I get this error message when I try to upload an image to my AWS Bucket.
I have verified my region here: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
My shrine.rb file:
require "shrine"
require "shrine/storage/s3"
require "image_processing/mini_magick"
s3_options = {
:access_key_id => ENV["AWS_ACCESS_KEY_ID"],
:secret_access_key => ENV["AWS_SECRET_KEY"],
:region => 'ca-central-1',
:bucket => ENV["AWS_BUCKET"],
}
Shrine.storages = {
cache: Shrine::Storage::S3.new(prefix: "cache", **s3_options),
store: Shrine::Storage::S3.new(prefix: "store", **s3_options),
}
I hardcoded in the region to see if it was perhaps the an issue with my ENV. but i get the same results.
I am stuck with how to proceed on this, as every time I try to set an endpoint for my region shrine screams and says its an invalid config.
Any assistance here would be greatly appreciated!