Skip to content

Instantly share code, notes, and snippets.

@pawneetdev
Last active May 14, 2018 04:54
Show Gist options
  • Save pawneetdev/dd3fd1297ce296c3e507517cdd170232 to your computer and use it in GitHub Desktop.
Save pawneetdev/dd3fd1297ce296c3e507517cdd170232 to your computer and use it in GitHub Desktop.
Set public read permission on files in a folder AWS S3 using boto3
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket('bucket_name_here')
for obj in bucket.objects.filter(Prefix='folder_name_here'):
obj.Acl().put(ACL='public-read')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment