Question:
I am trying to create a new bucket on S3 using boto3 and python. However, I want its ACLs to be disabled. I have tried the following code, but ACLs are still enabled. How can I disable ACLs using boto3?
Answer:
The create_bucket SDK does not control Object Ownership.I think that you need to indicate the
BucketOwnerEnforced
rule when calling put_bucket_ownership_controls, after the bucket has been created.If you have better answer, please add a comment about this, thank you!