Skip to content

LocationRestraint always empty on GetBucketLocation call #908

@jcarter3

Description

@jcarter3

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions