The workaround for using wildcards deleting s3 files doesn’t work for just listing them. This is a different workaround that does:
aws s3 ls s3://example-bucket/ --recursive | awk '{print $4}' | grep ".*\\.png"
The pattern for grep
is a full regex docs