I am using the aws cli to list the files in an s3 bucket using the following command (documentation):
aws s3 ls s3://mybucket --recursive --human-readable --
For only the file names, I find the easiest to be:
aws s3 ls s3://path/to/bucket/ | cut -d " " -f 4
This will cut the returned output at the spaces (cut -d " ") and return the fourth column (-f 4), which is the list of file names.
cut -d " "
-f 4