Last active
          May 14, 2018 04:54 
        
      - 
      
 - 
        
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
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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