-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws_cloudfront: default S3 bucket for logging does not enable ACL access #27571
Comments
@ghferrari , this was fixed by introduction of this flag in this PR which you need to enable in cdk.json
Let me know if it solves your issue. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
@khushail Thanks for the helpful reply and reference. I will test this feature flag and it seems likely it will workaround the problem. However, I don't consider this workaround a fix for the problem - the CDK resource remains broken by default. |
@khushail I agree with @ghferrari. The default behavior is broken, and this flag is not accurately exposed in documentation as to be a visible first solution for the issue. I had to arrive at discovery of that flag by way of this issue, and not the documentation, which I arrived at following links in other issues. Please recognize the poor DX around this one. |
For me the flag is not correctly fixing the issue either. I understand why we don't want to passively change the default behaviour though. |
Describe the bug
When providing a logging configuration for a CloudFrontWebDistribution, it is optional to specify an S3 bucket - when not specified, one will be created by default. However, the default S3 bucket configuration gives the error "The S3 bucket that you specified for CloudFront logs does not enable ACL access". This means that the default S3 bucket configuration is broken.
Expected Behavior
I expected the default S3 bucket configuration to be suitable for CloudFrontWebDistribution logs and for no error to be produced.
Current Behavior
Relying on the default S3 bucket configuration gives the error "The S3 bucket that you specified for CloudFront logs does not enable ACL access".
Reproduction Steps
Possible Solution
According to #25358 the S3 bucket defaults were updated in April 2023 - this may be the cause of the problem.
To resolve the problem, the default S3 bucket configuration at
aws-cdk/packages/aws-cdk-lib/aws-cloudfront/lib/web-distribution.ts
Line 962 in c445b8c
Additional Information/Context
No response
CDK CLI Version
2.101.0 (build cbaa50e)
Framework Version
Python package: aws-cdk-lib==2.101.0
Node.js Version
v18.18.2
OS
Debian Linux
Language
TypeScript, Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: