aws-sdk-ruby icon indicating copy to clipboard operation
aws-sdk-ruby copied to clipboard

S3 Bucket existence - unexpected behaviour

Open ravsom opened this issue 9 years ago • 5 comments

Issue description

I get this error for the region "ap-south-1" - Should I raise a new issue?

S3 client configured for "ap-south-1" but the bucket "dev-embryo-ui" is in "ap-south-1"; Please configure the proper region to avoid multiple unnecessary redirects and signing attempts

/home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.10.38/lib/aws-sdk-resources/resource.rb:134:inrescue in exists?': Aws::S3::Errors::BadRequest from /home/travis/.rvm/gems/ruby-2.2.7/gems/aws-sdk-resources-2.10.38/lib/aws-sdk-resources/resource.rb:131:in exists?'

I've created the bucket in the same region as I ask Travis to deploy. Despite that, I run into this issue.

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-core-2.10.38.gem

Version of Ruby, OS environment

ruby 2.2.7

ravsom avatar Sep 05 '17 01:09 ravsom

Just to help clarify, can you give me a reproducing code snippet?

awood45 avatar Sep 05 '17 05:09 awood45

The deployment is triggered via travis-ci; the script is as below - along with the access keys and secrets which I have currently removed.

language: node_js
node_js:
- '6'
deploy:
  provider: elasticbeanstalk
  region: "ap-south-1"
  app: opto-embryo-ui
  bucket_name: dev-embryo-ui
  env: OptoEmbryoUi-env

ravsom avatar Sep 05 '17 07:09 ravsom

@ravsom @awood45 any update on this ?

raheel0452 avatar Nov 24 '17 05:11 raheel0452

This code snippet looks like JS deployment? Sounds like the error is from Travis? I'd suggest open the issue with travis first, and since this is a server side error response, I'd also recommend open ticket with AWS Support if you can, such that they can look into the failed request IDs.

Happy to help investigate more if you/travis could provide specific ruby scripts that can reproduce this error.

cjyclaire avatar Dec 08 '17 20:12 cjyclaire

Closing due to ages. Feel free to reopen with further info or a ruby script with SDK usage that can reproduce the error.

cjyclaire avatar Dec 13 '17 21:12 cjyclaire