How to list all objects in an S3 bucket using the AWS CLI?

You can list all objects in an S3 bucket using the following AWS CLI command:

aws s3 ls s3://bucket-name

Replace bucket-name with the name of the S3 bucket you want to list objects from. This command will return a list of objects in the specified S3 bucket along with their details such as the object key, size, and last modified timestamp.