Skip to content

Commit 3537d0a

Browse files
committed
fix: updated logging bucket ACL settings in CDK to handle log delivery from CloudFront
1 parent e7963d8 commit 3537d0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import { type IIdentityPool } from '@aws-cdk/aws-cognito-identitypool-alpha';
88
import { Stack } from 'aws-cdk-lib';
99
import { type IUserPool, type IUserPoolClient } from 'aws-cdk-lib/aws-cognito';
10-
import { Bucket, BucketEncryption } from 'aws-cdk-lib/aws-s3';
10+
import { Bucket, BucketAccessControl, BucketEncryption } from 'aws-cdk-lib/aws-s3';
1111
import { type Construct } from 'constructs';
1212
import { API } from './api';
1313
import { Authentication } from './authentication';
@@ -40,6 +40,7 @@ export class GenAINewsletter extends Stack {
4040
const loggingBucket = new Bucket(this, 'GenAINewsletter-LoggingBucket', {
4141
encryption: BucketEncryption.S3_MANAGED,
4242
enforceSSL: true,
43+
accessControl: BucketAccessControl.LOG_DELIVERY_WRITE,
4344
});
4445

4546
const authentication = new Authentication(this, 'AuthenticationStack');

0 commit comments

Comments
 (0)