Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudbot s3_enable_logging / create new s3 bucket: error with ACLs #161

Open
cdrag1 opened this issue Jul 11, 2023 · 0 comments
Open

cloudbot s3_enable_logging / create new s3 bucket: error with ACLs #161

cdrag1 opened this issue Jul 11, 2023 · 0 comments

Comments

@cdrag1
Copy link

cdrag1 commented Jul 11, 2023

When the cloudbot ''s3_enable_logging'' is invoked and it does not find an s3 bucket to use as target bucket for server access logs, it tries to create a new s3 bucket with ACLs enabled.

This creates an error as AWS no longer allows the creation of an s3 bucket with ACLs enabled by default.
"(InvalidBucketAclWithObjectOwnership) when calling the CreateBucket operation: Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting"

"s3_enable_logging.py"
ACL='log-delivery-write'

AWS recommends creating the bucket with a bucket policy instead:
https://docs.aws.amazon.com/AmazonS3/latest/userguide/enable-server-access-logging.html#grant-log-delivery-permissions-general.

code in question:
https://github.com/dome9/cloud-bots/blob/master/bots/s3_enable_logging.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant