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.
To create a bucket, you must authenticate with an account that has a valid AWS Access Key ID and is registered with Amazon S3. Anonymous requests are never allowed to create buckets.
![]() | 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 |
PUT / HTTP/1.1 Host:destinationBucket.s3.amazonaws.com Content-Length: 0 Date:dateAuthorization:signature
This operation uses standard request headers.
HTTP/1.1 200 OK x-amz-id-2: id x-amz-request-id: request_id Date: date Content-Length: 0 Connection: close Server: AmazonS3
This operation uses standard response elements.
There are no special errors for this operation. For information about general Amazon S3 errors, see List of Error Codes.
This request creates a bucket named "colorpictures" without a location constraint.
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=
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.
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>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