-
Notifications
You must be signed in to change notification settings - Fork 711
Closed
Labels
bugThis issue is a bug.This issue is a bug.
Milestone
Description
- I've gone though the API reference
- I've checked AWS Forums and StackOverflow for answers
- I've searched for previous similar issues and didn't find any solution
Describe the bug
GetBucketLocation
returns empty LocationConstraint
Version of AWS SDK for Go?
Example: v0.29.0
Version of Go (go version
)?
go version go1.15.5 linux/amd64
To Reproduce (observed behavior)
cfg, err := config.LoadDefaultConfig()
// check err
svc := s3.NewFromConfig(cfg)
bucketLocation, err := svc.GetBucketLocation(context.Background(), &s3.GetBucketLocationInput{Bucket: aws.String("somebucket")})
// check err
fmt.Printf("bucket location: %v\n", bucketLocation.LocationConstraint)
// prints empty location for all buckets in all regions, (even those outside us-east-1)
Expected behavior
For the region that the bucket exists in to be returned (only nil/empty for buckets in us-east-1, per the documentation).
Additional context
I've validated that the proper region is returned via the aws cli
LumpKim
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.