How to change permission recursively to folder with AWS s3 or AWS s3api

This can be only be achieved with using pipes. Try –

aws s3 ls s3://bucket/path/ --recursive | awk '{cmd="aws s3api put-object-acl --acl bucket-owner-full-control --bucket bucket --key "$4; system(cmd)}'

Leave a Comment