dcl-ops-lib 6.3.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,4 +30,6 @@ export type StaticWebsite = {
30
30
  destroy?: boolean;
31
31
  priceClass?: "PriceClass_All" | "PriceClass_200" | "PriceClass_100";
32
32
  cachePolicyId?: Input<string>;
33
+ objectOwnership?: string;
34
+ overrideContentBucketACL?: string;
33
35
  };
package/buildStatic.js CHANGED
@@ -23,7 +23,7 @@ function buildStatic(staticSite) {
23
23
  const slug = staticSite.domain.replace(/\./g, "-") + "-";
24
24
  // contentBucket is the S3 bucket that the website's contents will be stored in.
25
25
  const bucketInfo = {
26
- acl: "public-read",
26
+ acl: staticSite.overrideContentBucketACL ? staticSite.overrideContentBucketACL : "public-read",
27
27
  // Configure S3 to serve bucket contents as a website. This way S3 will automatically convert
28
28
  // requests for "foo/" to "foo/index.html".
29
29
  website: {
@@ -38,6 +38,14 @@ function buildStatic(staticSite) {
38
38
  const contentBucket = new aws.s3.Bucket(slug + "contentBucket", bucketInfo, {
39
39
  protect,
40
40
  });
41
+ if (staticSite.objectOwnership) {
42
+ new aws.s3.BucketOwnershipControls(`${contentBucket.bucket}OwnershipControls`, {
43
+ bucket: contentBucket.bucket,
44
+ rule: {
45
+ objectOwnership: staticSite.objectOwnership
46
+ }
47
+ });
48
+ }
41
49
  // logsBucket is an S3 bucket that will contain the CDN's request logs.
42
50
  const logsBucket = new aws.s3.Bucket(slug + "logs", {
43
51
  acl: "private",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.3.0",
3
+ "version": "6.5.0",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"