You can replace "*.DS_Store"
with any other recurrent file (e.g. Desktop.ini
)
Validate that you are going to delete only what you want passing the --dryrun
option.
I've left if by default just in case of copy/paste.
aws s3 rm s3://your.bucket.name/maybe-a-subkey --dryrun --recursive --exclude "*" --include "*.DS_Store"
Thanks.