Is command is used to list S3 objects and common prefixes under a prefix or all S3 buckets.
Note that the --output and --no-paginate arguments are ignored for this
command.
Syntax: aws s3 ls
AWS command alone is not sufficient, omit --human reader-readable flag to get the output easier to work with, and the --summarize flag to remove the summary data at the end.
Try the given code:
aws s3 ls s3://mysS3bucket --recursive | awk '{print $4}'