Skip to content

Commit

Permalink
Fixing linting of aws-ts-static-website
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 committed Jan 4, 2022
1 parent 464fd6e commit 2797d97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions aws-ts-static-website/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ if (config.certificateArn === undefined) {

// Generate Origin Access Identity to access the private s3 bucket.
const originAccessIdentity = new aws.cloudfront.OriginAccessIdentity("originAccessIdentity", {
comment: "this is needed to setup s3 polices and make s3 not public."
comment: "this is needed to setup s3 polices and make s3 not public.",
});

// if config.includeWWW include an alias for the www subdomain
Expand All @@ -176,8 +176,8 @@ const distributionArgs: aws.cloudfront.DistributionArgs = {
originId: contentBucket.arn,
domainName: contentBucket.websiteEndpoint,
s3OriginConfig: {
originAccessIdentity: originAccessIdentity.cloudfrontAccessIdentityPath
},
originAccessIdentity: originAccessIdentity.cloudfrontAccessIdentityPath,
},
},
],

Expand Down Expand Up @@ -303,13 +303,13 @@ const bucketPolicy = new aws.s3.BucketPolicy("bucketPolicy", {
{
Effect: "Allow",
Principal: {
AWS: oaiArn
AWS: oaiArn,
}, // Only allow Cloudfront read access.
Action: ["s3:GetObject"],
Resource: [`${bucketArn}/*`], // Give Cloudfront access to the entire bucket.
},
],
}))
})),
});

const aRecord = createAliasRecord(config.targetDomain, cdn);
Expand Down

0 comments on commit 2797d97

Please sign in to comment.