After further investigation, it appears that the Boto3 documentation for client.create_bucket() method is missing some key options for the 'ACL' parameter. Specifically, it is missing:
ACL='log-delivery-write'
Luckily, the full set of options can be found in a link off the AWS Documentation that @garnaat provided. Thanks for that pointer.
Once I implemented this option for the log bucket, I was able to enable logging for the example bucket using client.put_bucket_logging()
kw_args = {
'Bucket': 'example-log-bucket,
'ACL': 'log-delivery-write'
}
client.create_bucket(**kw_args)
kw_args = {
'Bucket': 'example-user-bucket,
'ACL': 'private'
}
client.create_bucket(**kw_args)
kw_args = {
'Bucket': 'example-user-bucket,
'BucketLoggingStatus': {
'LoggingEnabled': {
'TargetBucket': 'example-log-bucket',
'TargetPrefix': 'user/'
}
}
}
client.put_bucket_logging(**kw_args)
Hopefully someone with privileges will get a chance to adjust the boto3 documentation for S3 at some point. It would also be nice to have a heads up in the documentation about Amazon's three pre-defined groups, since there are a lot of methods which grant permissions to groups.