-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 createBucket sends us-east-1 region by default #919
Comments
Hi @andrewgaul If you are looking to change the default region so that you don't need to specify the region each time you call the |
@LiuJoyceC Some S3 implementations, e.g., S3Proxy, do not have a notion of regions. Requiring users to configure this is confusing and diverges from how other AWS SDKs work, e.g., Java SDK, which send no region when not configured. |
@andrewgaul I'm not sure we could change this behavior if we wanted to, but if we did, this would be a breaking change for customers that are creating buckets in |
@chrisradek The quoted passage requires a region specified in the v4 signature but not the location constraint, which defaults to
Note that no location constraint is specified, i.e., no entity body. |
@andrewgaul If the user doesn't specify a location constraint, and no region is defined, the SDK doesn't send a location constraint. Quick test code: //If AWS_REGION wasn't set, then AWS.config.region should be undefined
var s3 = new AWS.S3({signatureVersion: 'v4'});
s3.createBucket({Bucket: 'myNewBucket'}, function(err, data) {}); Result when inspecting
You'll notice the Content-Length is 0 in this case; we aren't providing a location constraint. If the user has a region defined in a region other than So, it looks like we are behaving the same way as the Java SDK when no region is defined. What behavior are you seeing exactly? Maybe an example would help us understand better. |
Closing this issue as it looks like our SDK is behaving the same as the Java SDK when no region is defined in the SDK. Please feel free to comment if more clarification is needed, or you have more details to share. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Instead it would be better for it to send no location when not specified. This will default to us-east-1 for aws and allow third-party implementations to default to their correct behavior.
The text was updated successfully, but these errors were encountered: