1. To List objects in s3 bucket

Command

Command Output

2. To List All objects in s3 bucket Recursively

Command

Command Output

3. To list & count objects in s3 bucket

Command

Command Output

4. To list & count objects in s3 bucket recursively

Command

Command Output

5. Other Options in aws s3 ls

–recursive [boolean] Command is performed on all files or objects under the specified directory or prefix.
–page-size [integer] The number of results to return in each response to a list operation. The default value is 1000 (the maximum al…
–human-readable [boolean] Displays file sizes in human readable format.
–summarize [boolean] Displays summary information (number of objects, total size).
–request-payer [string] Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this…
–debug [boolean] Turn on debug logging.
–endpoint-url [string] Override command’s default URL with the given URL.
–no-verify-ssl [boolean] By default, the AWS CLI uses SSL when communicating with AWS services. For each SSL connection, the AWS CLI wi…
–no-paginate [boolean] Disable automatic pagination.
–output [string] The formatting style for command output.
–query [string] A JMESPath query to use in filtering the response data.
–profile [string] Use a specific profile from your credential file.
–region [string] The region to use. Overrides config/env settings.
–version [string] Display the version of this

Display Size in human readable form