Skip to content

Commit

Permalink
Do not configure ACL on the logs bucket
Browse files Browse the repository at this point in the history
Also clean up some comments.
  • Loading branch information
t0yv0 committed Oct 3, 2024
1 parent e32debf commit c6384b7
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions aws-ts-netlify-cms-and-oauth/cms/infrastructure/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,11 @@ const config = {
};

// contentBucket is the S3 bucket that the website's contents will be stored in.
const contentBucket = new aws.s3.BucketV2("contentBucket",
{
bucket: config.targetDomain,
// acl: "public-read",
// // Configure S3 to serve bucket contents as a website. This way S3 will automatically convert
// // requests for "foo/" to "foo/index.html".
// website: {
// indexDocument: "index.html",
// // errorDocument: "404.html",
// },
});
const contentBucket = new aws.s3.BucketV2("contentBucket", {
bucket: config.targetDomain,
});

const contentBucketWebsite = new aws.s3.BucketWebsiteConfigurationV2("contentBucket", {
const contentBucketWebsite = new aws.s3.BucketWebsiteConfigurationV2("contentBucket", {
bucket: contentBucket.bucket,
indexDocument: {suffix: "index.html"},
errorDocument: {key: "404.html"},
Expand Down Expand Up @@ -81,13 +73,9 @@ crawlDirectory(
});

// logsBucket is an S3 bucket that will contain the CDN's request logs.
const logsBucket = new aws.s3.BucketV2("requestLogs",
{
bucket: `${config.targetDomain}-logs`,
acl: "private",
});

configureACL("requestLogs", logsBucket, "private");
const logsBucket = new aws.s3.BucketV2("requestLogs", {
bucket: `${config.targetDomain}-logs`,
});

const tenMinutes = 60 * 10;

Expand Down

0 comments on commit c6384b7

Please sign in to comment.