-
Notifications
You must be signed in to change notification settings - Fork 634
Closed
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issues3service-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.
Description
Describe the issue
The AWS-SDK documentation recommends using HeadBucket instead of GetBucketLocation for determining Bucket region:
We recommend that you use [HeadBucket ](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html)
to return the Region that a bucket resides in. For backward compatibility, Amazon S3 continues to support GetBucketLocation.
However, the header that contains this piece of information is not contained in the $metadata
attribute of the HeadBucketCommandOutput object. According to Generic documentation, this information is returned in the x-amz-bucket-region
header, which does not seem to be part of the RequestMetadata (does not show in a debugger either).
Links
https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/GetBucketLocationCommand/
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.p2This is a standard priority issueThis is a standard priority issues3service-apiThis issue is due to a problem in a service API, not the SDK implementation.This issue is due to a problem in a service API, not the SDK implementation.