GET Service

Description

The GET operation on the Service endpoint (s3.amazonaws.com) returns a list of all of the buckets owned by the authenticated sender of the request.

You must authenticate with a valid AWS Access Key ID that is registered with Amazon S3. Anonymous requests cannot list buckets, and you cannot list buckets that you did not create.

Requests

Syntax

GET / HTTP/1.1
Host: s3.amazonaws.com
Date: date
Authorization: signature

Headers

This operation uses standard request headers.

Responses

Success Response

Syntax

HTTP/1.1 200 OK
x-amz-id-2: id
x-amz-request-id: request_id
Date: date
Content-Type: type
Content-Length: length
Connection: close
Server: AmazonS3

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://doc.s3.amazonaws.com/2006-03-01">
  <Owner>
    <ID>user_id</ID>
    <DisplayName>display_name</DisplayName>
  </Owner>
  <Buckets>
    <Bucket>
      <Name>bucket_name</Name>
      <CreationDate>date</CreationDate>
    </Bucket>
    ...
  </Buckets>
</ListAllMyBucketsResult>

Elements

Name Description
Owner

Lists information about the bucket owner.

Type: ID and DisplayName

Ancestor: ListAllMyBucketsResult

Buckets

Lists buckets and their metadata.

Type: String

Ancestor: ListAllMyBucketsResult

Special Errors

There are no special errors for this operation. For information about general Amazon S3 errors, see List of Error Codes.

Examples

Sample Request

The GET operation on the Service endpoint (s3.amazonaws.com) returns a list of all of the buckets owned by the authenticated sender of the request.

GET / HTTP/1.1
Host: s3.amazonaws.com
Date: Wed, 01 Mar  2006 12:00:00 GMT
Authorization: AWS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://doc.s3.amazonaws.com/2006-03-01">
  <Owner>
    <ID>bcaf1ffd86f41caff1a493dc2ad8c2c281e37522a640e161ca5fb16fd081034f</ID>
    <DisplayName>webfile</DisplayName>
  </Owner>
  <Buckets>
    <Bucket>
      <Name>quotes;/Name>
      <CreationDate>2006-02-03T16:45:09.000Z</CreationDate>
    </Bucket>
    <Bucket>
      <Name>samples</Name>
      <CreationDate>2006-02-03T16:41:58.000Z</CreationDate>
    </Bucket>
  </Buckets>
</ListAllMyBucketsResult>

Related Resources