LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

aws-s3-ls

List S3 buckets and objects

TLDR

List all S3 buckets in your account
$ aws s3 ls
copy
List objects in a bucket
$ aws s3 ls s3://[bucket-name]/
copy
List objects under a specific prefix
$ aws s3 ls s3://[bucket-name]/[prefix/]
copy
Recursively list all objects in a bucket
$ aws s3 ls s3://[bucket-name] --recursive
copy
List with human-readable sizes and summary
$ aws s3 ls s3://[bucket-name] --recursive --human-readable --summarize
copy
List buckets starting with a specific prefix
$ aws s3 ls --bucket-name-prefix [my-prefix]
copy

SYNOPSIS

aws s3 ls [S3Uri] [options]

DESCRIPTION

aws s3 ls lists S3 objects and common prefixes under a specified prefix, or lists all S3 buckets when no URI is provided. The output shows the last modified date, size, and object key for each item.When listing bucket contents, objects are displayed with timestamps and sizes, while common prefixes (similar to directories) are shown with a PRE indicator. The command supports recursive listing to show all objects under a prefix.

PARAMETERS

--recursive

List all objects under the specified prefix, including nested objects
--human-readable
Display file sizes in human-readable format (KB, MB, GB)
--summarize
Display summary information including total number of objects and total size
--page-size value
Number of results to return in each response (default: 1000)
--request-payer value
Confirm that the requester will pay for request and data transfer costs
--bucket-name-prefix value
Filter bucket list to names beginning with the specified prefix
--bucket-region value
Filter bucket list to buckets in the specified AWS Region

INSTALL

sudo dnf install aws
copy
sudo pacman -S aws-cli
copy
sudo apk add aws-cli
copy
sudo zypper install aws-cli
copy

CAVEATS

The --output and --no-paginate global arguments are ignored for this command. Output format is fixed and cannot be changed to JSON or other formats. For programmatic access to S3 listings with flexible output, use aws s3api list-objects-v2 instead.

SEE ALSO

aws-s3(1), aws-s3-cp(1), aws-s3api(1), ls(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid