Writing to another account’s S3, remember to set the ACL

https://stackoverflow.com/questions/61610874/how-can-i-assign-bucket-owner-full-control-when-creating-an-s3-object-with-boto3

Otherwise, you can write the file but they can’t access it 🙂

s3.put_object(
    Bucket=bucketname,
    Key=filename,
    Body=content_bytes,
    ContentMD5=content_md5,
    ACL="bucket-owner-full-control"  # Uncomment this line to generate error
)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s