How to upload a file to S3 and make it public using boto3?
To upload and set permission to publicly-readable in one step, you can use:
bucket.upload_file(file, key, ExtraArgs={'ACL':'public-read'})
I was able to do it using objectAcl API:
s3 = boto3.resource('s3')object_acl = s3.ObjectAcl('bucket_name','object_key')response = object_acl.put(ACL='public-read')
For details: http://boto3.readthedocs.io/en/latest/reference/services/s3.html#objectacl