v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1497574737.9 KB

Returns the Region the bucket resides in. You set the bucket's Region using the LocationConstraint request parameter in a CreateBucket request. For more information, see CreateBucket.

To use this implementation of the operation, you must be the bucket owner.

To use this API against an access point, provide the alias of the access point in place of the bucket name.

The following operations are related to GetBucketLocation:

get/{Bucket}#location

Path parameters

Bucketstring required

The name of the bucket for which to get the location.

Query parameters

locationtrue required

Headers

x-amz-expected-bucket-ownerstring

The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code <code>403 Forbidden</code> (access denied).

Response

Success