I have been using AWK for this command but it is so slow.
There must be a faster way to process this list from an aws s3 ls command
s5cmd ls s3://bucket-name/* | awk -v AWS_BUCKET="bucket-name" '{cmd="aws s3api put-object-acl --access-control-policy file:///access_policy.json --bucket " AWS_BUCKET " --key "$5; system(cmd); print $5}'
This basically lists all objects then applies an ACL to them.
Any ideas?