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 --
My Solution
List only files recursively using aws cli.
aws s3 ls s3://myBucket --recursive | awk 'NF>1{print $4}' | grep .
grep .
- Clear empty lines.
Example: aws s3 ls s3://myBucket
PRE f5c10c1678e8484482964b8fdcfe43ad/
PRE f65b94ad31734135a61a7fb932f7054d/
PRE f79b12a226b542dbb373c502bf125ffb/
PRE logos/
PRE test/
PRE userpics/
2019-05-14 10:56:28 7754 stage.js
Solution: aws s3 ls s3://myBucket --recursive | awk 'NF>1{print $4}' | grep .
stage.js