@@ -134,7 +134,7 @@ export class StacksCloud extends Stack {
134
134
if ( this . apiCachePolicy )
135
135
return this . apiCachePolicy
136
136
137
- this . apiCachePolicy = new cloudfront . CachePolicy ( this , 'StacksApiCachePolicy ' , {
137
+ this . apiCachePolicy = new cloudfront . CachePolicy ( this , 'ApiCachePolicy ' , {
138
138
comment : 'Stacks API Cache Policy' ,
139
139
cachePolicyName : `${ this . appName } -${ appEnv } -api-cache-policy` ,
140
140
// minTtl: config.cloud.cdn?.minTtl ? Duration.seconds(config.cloud.cdn.minTtl) : undefined,
@@ -148,7 +148,7 @@ export class StacksCloud extends Stack {
148
148
}
149
149
150
150
deployApi ( ) {
151
- const layer = new lambda . LayerVersion ( this , 'StacksLambdaLayer ' , {
151
+ const layer = new lambda . LayerVersion ( this , 'BunLambdaLayer ' , {
152
152
code : lambda . Code . fromAsset ( p . projectStoragePath ( 'framework/cloud/bun-lambda-layer.zip' ) ) ,
153
153
compatibleRuntimes : [ lambda . Runtime . PROVIDED_AL2 ] ,
154
154
compatibleArchitectures : [ lambda . Architecture . ARM_64 ] ,
@@ -310,7 +310,7 @@ export class StacksCloud extends Stack {
310
310
}
311
311
312
312
manageCertificate ( ) {
313
- this . certificate = new acm . Certificate ( this , 'StacksCertificate ' , {
313
+ this . certificate = new acm . Certificate ( this , 'Certificate ' , {
314
314
domainName : this . domain ,
315
315
validation : acm . CertificateValidation . fromDns ( this . zone ) ,
316
316
subjectAlternativeNames : [ `www.${ this . domain } ` ] ,
@@ -352,6 +352,12 @@ export class StacksCloud extends Stack {
352
352
bucketName : `${ this . appName } -logs-${ appEnv } -${ timestamp } ` ,
353
353
removalPolicy : RemovalPolicy . DESTROY ,
354
354
autoDeleteObjects : true ,
355
+ blockPublicAccess : new s3 . BlockPublicAccess ( {
356
+ blockPublicAcls : false ,
357
+ ignorePublicAcls : true ,
358
+ blockPublicPolicy : true ,
359
+ restrictPublicBuckets : true ,
360
+ } ) ,
355
361
objectOwnership : s3 . ObjectOwnership . BUCKET_OWNER_PREFERRED ,
356
362
} )
357
363
Tags . of ( logBucket ) . add ( 'daily-backup' , 'true' )
@@ -361,7 +367,7 @@ export class StacksCloud extends Stack {
361
367
362
368
// Daily 35 day retention
363
369
const vault = new backup . BackupVault ( this , 'BackupVault' , {
364
- backupVaultName : `${ this . appName } -${ appEnv } -daily-backup-vault` ,
370
+ backupVaultName : `${ this . appName } -${ appEnv } -daily-backup-vault- ${ timestamp } ` ,
365
371
// encryptionKey: this.storage?.encryptionKey,
366
372
} )
367
373
const plan = backup . BackupPlan . daily35DayRetention ( this , 'BackupPlan' , vault )
@@ -597,7 +603,7 @@ export class StacksCloud extends Stack {
597
603
// natGateways: 1,
598
604
} )
599
605
600
- this . storage . fileSystem = new efs . FileSystem ( this , 'StacksFileSystem ' , {
606
+ this . storage . fileSystem = new efs . FileSystem ( this , 'FileSystem ' , {
601
607
vpc : this . vpc ,
602
608
fileSystemName : `${ this . appName } -${ appEnv } -efs` ,
603
609
removalPolicy : RemovalPolicy . DESTROY ,
@@ -634,7 +640,7 @@ export class StacksCloud extends Stack {
634
640
` ) ,
635
641
} )
636
642
637
- this . storage . accessPoint = new efs . AccessPoint ( this , 'StacksAccessPoint ' , {
643
+ this . storage . accessPoint = new efs . AccessPoint ( this , 'FileSystemAccessPoint ' , {
638
644
fileSystem : this . storage . fileSystem ,
639
645
path : '/' ,
640
646
posixUser : {
0 commit comments