ListBuckets - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.


Returns a list of all buckets owned by the authenticated sender of the request. To use this operation, you must have the s3:ListAllMyBuckets permission.

For information about Amazon S3 buckets, see Creating, configuring, and working with Amazon S3 buckets.

Request Syntax

GET / HTTP/1.1 Host:

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 <?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult> <Buckets> <Bucket> <CreationDate>timestamp</CreationDate> <Name>string</Name> </Bucket> </Buckets> <Owner> <DisplayName>string</DisplayName> <ID>string</ID> </Owner> </ListAllMyBucketsResult>

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service.


Root level tag for the ListAllMyBucketsResult parameters.

Required: Yes


The list of buckets owned by the requester.

Type: Array of Bucket data types


The owner of the buckets listed.

Type: Owner data type


Sample Request

The following request returns a list of all buckets of the sender.

HTTP/1.1 200 OK <ListAllMyBucketsResult> <Buckets> <Bucket> <CreationDate>2019-12-11T23:32:47+00:00</CreationDate> <String>DOC-EXAMPLE-BUCKET</String> </Bucket> <Bucket> <CreationDate>2019-11-10T23:32:13+00:00</CreationDate> <String>DOC-EXAMPLE-BUCKET2</String> </Bucket> </Buckets> <Owner> <DisplayName>Account+Name</DisplayName> <ID>AIDACKCEVSQ6C2EXAMPLE</ID> </Owner> </ListAllMyBucketsResult>

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: