From c2b527acef094bd649afb7e46290b3436b1bc882 Mon Sep 17 00:00:00 2001 From: Douglas Naphas Date: Sun, 4 Feb 2024 10:35:05 -0500 Subject: [PATCH] Opt in to automatic log bucket creation Now ACLs aren't enabled by default in logging buckets. So I need to specify the ACL settings myself. I don't know the right ACL settings for CloudFront distro logging buckets. But enableLogging: true creates a bucket for me. https://github.com/aws/aws-cdk/issues/25358 https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront-readme.html#logging --- infra/lib/madliberation-webapp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/lib/madliberation-webapp.ts b/infra/lib/madliberation-webapp.ts index ae5245bd..4518baa6 100644 --- a/infra/lib/madliberation-webapp.ts +++ b/infra/lib/madliberation-webapp.ts @@ -72,7 +72,7 @@ export class MadliberationWebapp extends Stack { } const distroProps: any = { - logBucket: appBucket(this, "DistroLoggingBucket"), + enableLogging: true, logFilePrefix: "distribution-access-logs/", logIncludesCookies: true, defaultBehavior: {