Skip to content

Instantly share code, notes, and snippets.

@9to6
Created October 21, 2019 10:07
Show Gist options
  • Save 9to6/6c13f447622c24dd1b0c2bbb3e94ffc8 to your computer and use it in GitHub Desktop.
Save 9to6/6c13f447622c24dd1b0c2bbb3e94ffc8 to your computer and use it in GitHub Desktop.
s3 public ACL script
aws --profile 9to6 s3api list-objects --bucket bucket_name |while read line
do
echo $line
command=$(echo "aws --profile 9to6 s3api put-object-acl --acl public-read --bucket bucket_name --key $line")
echo "$command"
bash -c "$command"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment