Skip to content

Commit

Permalink
chore(infra): allow creating s3 public policies
Browse files Browse the repository at this point in the history
  • Loading branch information
geclos committed Dec 13, 2024
1 parent 4b8358d commit bab06ed
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion apps/infra/src/core/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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(
Expand Down

0 comments on commit bab06ed

Please sign in to comment.