I have a bucket on the Amazon S3 with the folder in it. I’m trying to access it the following way via aws-sdk gem:
s3 = AWS::S3.new(
:access_key_id => "KEY",
:secret_access_key => "SECRET"
)
bucket = s3.buckets["my_bucket/my_folder"]
bucket.do_stuff....
I am getting the following error in return:
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
Any ideas what I may be doing wrong?
probably the S3 bucket are trying to use is located outside the US-EAST (default location), so this should help you:
Choose your S3 enpdpoint from the following list:
In terms of object access, the bucket name is my_bucket, but my_folder should be a part of object.