-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3 bucket existence - unexpected behavior #1267
Comments
Hum interesting, I just tried now and it works ? Did you do anything ? |
No changes on our end. I can't reproduce this, so it's hard to say why you're seeing this without a wire trace of the call. The bucket also doesn't exist (as of the time of writing), so I don't think it's the same issue we saw before. |
Closing it as I cannot reproduce it for now. @awood45 how can I check what request is failing if this happen again in the future ? because there was clearly something going wrong at the time. |
If it's consistent over a period of time, run a wire trace of your call. For example: require 'aws-sdk'
resource = Aws::S3::Resource.new(region: 'us-east-1', http_wire_trace: true)
bucket = resource.bucket('healix')
bucket.exists? This will output a wire trace of the client calls made, and this would allow you to verify if we are making a well-formed request. If we are, then the issue is with the service. If we aren't making a valid request, that's a bug. |
Go it again:
|
Trimmed parts of that - interesting that you got exactly that error, I don't see anything off-hand that's broken. However, I can take this to the service team to take a look. |
I went HEAD the bucket. I was curious to know what region the bucket is in. The bucket seems to no longer exist. My guess is the bucket is not in us-east-1, but it is being signed as such. Normally the SDK would detect this region-missmatch, but S3 does not return sufficient information. Normally the error would be returned in the response body, but HEAD responses do not have a body. Also, a HEAD bucket request would normally return an "x-amz-bucket-region" response header. Did you remove this from the error response when copy-pasting it? |
After a discussion with Trevor - are you getting this error on a freshly created bucket? |
It looks like you're getting some edge case behavior that has to do with recent creation/deletion of the bucket. If the bucket is recently deleted, but did exist in a different region, you'll potentially see the 400 instead of a 404. This does raise an interesting question about if we can handle this edge case in the I'm going to take this as a feature request (looking for a clean way to handle this edge case), but we may not be able to fix this particular issue. Let me know if you have any other questions or concerns. |
Will take a look at that, thanks. Added to feature request backlog. |
When I used s3 endpoint as 'https://us-east-1.s3.amazonaws.com' and upload the content to 'bucket', it used to fail with saying bucket not found. But if I create a dummy bucket 'bucket.us-east-1' it used to work. After a while, realized that using the endpoint 's3.amazonaws.com' without any region in it, fixed the error. |
This bug is similar to #1161:
If I try with aws-shell:
The text was updated successfully, but these errors were encountered: