-
Notifications
You must be signed in to change notification settings - Fork 251
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
CloudFrontToS3: Logging buckets shouldn't be created when set to false #1157
Comments
The construct can create up to 4 buckets:
Setting the two flags you provide to false:
Should prevent the creation of buckets #2 and 4. Since you provide an existing bucket, setting
This will prevent creation of bucket #3. The construct will also then cease creating bucket #4. That should satisfy your use case of no logging. This does appear to identify a bug though - if CloudFront logging is enabled (the default) and logCloudFrontAccessLog is false then only bucket #3 should be created and we also see bucket #4 created when running your code. We will look into that- thanks! |
This bug was fixed in v2.65.0 |
I received an notification about an update to this issue, but I don't see it here - I'm guessing it was then deleted? It concerned the buckets still being created in the code above. I believe the bucket referenced is the CloudFront traffic log bucket ( bucket #3 above). That's the log of all CloudFront traffic and separate from the two possible S3 Access Log buckets (buckets #2 and #4). CloudFront traffic logging can be turned off in cloudFrontDistributionProps, if you include this in your CloudFrontToS3Props you will not get bucket #324
I should note that leaving this logging enabled is a best practice and we would strongly recommend against turning it off. If you deleted the comment because you'd already realized this you can close this Issue again. |
Hey @biffgaut. Thanks for that. I did forget to add in your
After doing this, it works as intended. Thanks for your help! |
CloudFrontToS3 allows you to provide two boolean parameters to disable S3 logging, and CloudFront logging:
logS3AccessLogs
: boolean (default true)logCloudFrontAccessLog
: boolean (default true)When these are set to false, I expect there to be no created S3 buckets for logging purposes. However, this is not the case.
Reproduction Steps
Create the construct with
logS3AccessLogs
tofalse
, andlogCloudFrontAccessLog
tofalse
:Deploying this will result in two logging buckets being created:
I expect these two buckets to not have been created in the first place.
Error Log
There is no error log as this is a bug
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: