Skip to content

Commit

Permalink
configure bucket key by default in thé analytics bucket (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgkowski authored Feb 13, 2024
1 parent 3f2ea17 commit 5dd771e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions framework/src/storage/lib/analytics-bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class AnalyticsBucket extends Bucket {
blockPublicAccess: props?.blockPublicAccess || BlockPublicAccess.BLOCK_ALL,
enforceSSL: true,
encryption: BucketEncryption.KMS,
bucketKeyEnabled: true,
lifecycleRules: props?.lifecycleRules?.concat(AnalyticsBucket.LIFECYCLE_RULE) || AnalyticsBucket.LIFECYCLE_RULE,
removalPolicy,
serverAccessLogsPrefix: props?.serverAccessLogsPrefix || bucketName,
Expand Down
1 change: 1 addition & 0 deletions framework/test/unit/storage/analytics-bucket.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe('AnalyticsBucket Construct with default configuration', () => {
BucketEncryption: {
ServerSideEncryptionConfiguration: [
{
BucketKeyEnabled: true,
ServerSideEncryptionByDefault: {
SSEAlgorithm: 'aws:kms',
},
Expand Down

0 comments on commit 5dd771e

Please sign in to comment.