The PUT request operation with a bucket URI creates
a new bucket. Depending on your latency and legal requirements, you can
specify a location constraint that will affect where your data
physically resides. You can currently specify a Europe (EU) location
constraint.
![]() | Note |
|---|---|
Not every string is an acceptable bucket name. For information on bucket naming restrictions, see Working with Amazon S3 Buckets.
If you create a bucket using If you do not specify a location constraint, Amazon S3 automatically selects a location which will be billed at the standard Amazon S3 rates.
To determine whether a bucket name exists, use |
Example
This request creates a bucket named "colorpictures" without a location constraint.
Sample Request
PUT / HTTP/1.1 Host: colorpictures.s3.amazonaws.com Content-Length: 0 Date: Wed, 01 Mar 2006 12:00:00 GMT Authorization: AWS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
Sample Response
HTTP/1.1 200 OK x-amz-id-2: YgIPIfBiKa2bj0KMg95r/0zo3emzU4dzsD4rcKCHQUAdQkf3ShJTOOpXUueF6QKo x-amz-request-id: 236A8905248E5A01 Date: Wed, 01 Mar 2006 12:00:00 GMT Location: /colorpictures Content-Length: 0 Connection: close Server: AmazonS3
This request creates a bucket named "colourpictures" using the Europe location constraint.
Sample Request
PUT / HTTP/1.1
Host: colourpictures.s3.amazonaws.com
Content-Length: 111
Date: Wed, 01 Mar 2006 12:00:00 GMT
Authorization: AWS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
<CreateBucketConfiguration>
<LocationConstraint>EU</LocationConstraint>
</CreateBucketConfiguration>
Sample Response
HTTP/1.1 200 OK x-amz-id-2: YgIPIfBiKa2bj0KMg95r/0zo3emzU4dzsD4rcKCHQUAdQkf3ShJTOOpXUueF6QKo x-amz-request-id: 236A8905248E5A01 Date: Wed, 01 Mar 2006 12:00:00 GMT Location: /colourpictures Content-Length: 0 Connection: close Server: AmazonS3