list-buckets

Returns a list of all buckets owned by the authenticated sender of the request.

See also: AWS API Documentation.

Synopsis

list-buckets
  [--cli-input-json <value>]

Options

--cli-input-json (string)

Operates a service or services based on the provided JSON string. If other arguments are provided on the command line, the CLI values override the JSON-provided values. You cannot pass arbitrary binary values using a JSON-provided value, because the string is taken literally.

Examples

The following command uses the list-buckets command to display the names of all your S3 buckets (across all regions):

$ aws s3api list-buckets --query "Buckets[].Name"

The query option filters the output of list-buckets down to only the bucket names.

For more information about buckets, see Working with Amazon S3 Buckets in the Amazon S3 Developer Guide.

Output

Buckets -> (list)

(structure)

Name -> (string)

The name of the bucket.

CreationDate -> (timestamp)

Date the bucket was created.

Owner -> (structure)

DisplayName -> (string)

ID -> (string)