Skip to content

Instantly share code, notes, and snippets.

@francotel
Forked from phlipper/s3api.sh
Created July 8, 2019 22:40
Show Gist options
  • Save francotel/0143461895089ccfa90f2d90c0c29b41 to your computer and use it in GitHub Desktop.
Save francotel/0143461895089ccfa90f2d90c0c29b41 to your computer and use it in GitHub Desktop.
AWS CLI S3 Update ACLs
aws s3api list-objects --bucket=mys3bucket \
--region=us-west-2 \
--output=text \
--prefix=myprefix \
--query='Contents[].[Key]' | \
xargs -P4 -I % aws s3api put-object-acl \
--acl=public-read \
--region=us-west-2 \
--bucket=mys3bucket \
--key='%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment