Im trying to create a bucket while making it public programmatically via the ibm-cos-sdk in python. IBM/AWS documentation says I have to do it like this.
response = cos.create_bucket(
Bucket=bucket_name,
CreateBucketConfiguration={"LocationConstraint": COS_LOCATION},
ObjectOwnership="ObjectWriter",
)
cos.put_public_access_block(
Bucket=bucket_name,
PublicAccessBlockConfiguration={
"BlockPublicAcls": False,
"IgnorePublicAcls": False,
},
)
cos.put_bucket_acl(ACL="public-read", Bucket=bucket_name)
This code creates a bucket but doesn't make it public. I noticed on AWS boto3 documentation there's an additional ObjectOwnership attribute that is passed to cos.create_bucket but that option is not available on ibm-cos-sdk. Anything I'm missing?