I am trying to delete uploaded image files with the AWS-SDK-Core Ruby Gem.
I have the following code:
require \'aws-sdk-core\'
def pull_picture(pict
I had same error. It occurred when s3 client was created with different endpoint than the one which was set up while creating bucket.
s3Client = New AmazonS3Client(AWS_ACCESS_KEY, AWS_SECRET_KEY, RegionEndpoint.USWest2)
s3Client = New AmazonS3Client(AWS_ACCESS_KEY, AWS_SECRET_KEY, RegionEndpoint.USEast1)
Check your bucket location in the console, then use this as reference to which endpoint to use: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
I Have faced the same issue.After a lot of struggle I found that the real issue is with the com.amazonaws dependencies.After adding dependencies this error got disappeared.
I was facing a similar error because the bucket was in region us-west-2
and the URL pattern had bucketname in the path. Once, I changed the URL pattern to have bucketname as URL subdomain to grab the files and it worked.
For eg previous URL was
https://s3.amazonaws.com/bucketname/filePath/filename
Then I replaced it as
https://bucketname.s3.amazonaws.com/filePath/filename
I got this error when I tried to access a bucket that didn't exist.
I mistakenly switched a path variable with the bucket name variable and so the bucket name had the file path value. So maybe double-check, if the bucket name that you set on your request is correct.
For many S3 API packages (I recently had this problem the npm s3 package) you can run into issues where the region is assumed to be US Standard, and lookup by name will require you to explicitly define the region if you choose to host a bucket outside of that region.