diff --git a/apps/infra/src/core/s3.ts b/apps/infra/src/core/s3.ts index 186781503..4fdb441cc 100644 --- a/apps/infra/src/core/s3.ts +++ b/apps/infra/src/core/s3.ts @@ -22,7 +22,7 @@ export const bucketName = bucket.bucket export const publicBucket = new aws.s3.BucketV2( 'publicLatitudeBucketResource', { - acl: 'private', // Keep ACL private to disallow all actions by default + acl: 'private', bucket: 'latitude-llm-public-bucket-production', tags: { Name: 'Latitude LLM public bucket', @@ -32,6 +32,18 @@ export const publicBucket = new aws.s3.BucketV2( { provider: regionProvider }, ) +new aws.s3.BucketPublicAccessBlock( + 'publicLatitudeBucketPublicAccess', + { + bucket: publicBucket.id, + blockPublicAcls: false, + blockPublicPolicy: false, + ignorePublicAcls: false, + restrictPublicBuckets: false, + }, + { provider: regionProvider }, +) + export const publicBucketName = publicBucket.bucket new aws.s3.BucketPolicy(