Yousef
10/23/2021, 6:12 PMthdxr
10/23/2021, 6:19 PMFrank
Frank
Frank
Yousef
10/24/2021, 4:21 AMthdxr
10/24/2021, 6:11 AMthdxr
10/24/2021, 6:11 AMFrank
Yousef
10/26/2021, 1:31 AMYousef
11/11/2021, 2:08 PM34259 | CREATE_FAILED | AWS:CloudFront:CachePolicy | StaticCache185A1D0E - Internal error reported from downstream service during operation 'AWS:CloudFront:CachePolicy'.
134300 | CREATE_FAILED | AWS:CloudFormation:CustomResource | NextSiteCertificateCertificateRequestorResource7D52AF43 - Resource creation cancelled
134307 | CREATE_FAILED | AWS:Lambda:Function | NextSiteS3Handler2C74DCB2 - Resource creation cancelled
134314 | CREATE_FAILED | AWS:CloudFront:CachePolicy | ImageCache1A294B32 - Internal error reported from downstream service during operation 'AWS:CloudFront:CachePolicy'.
134317 | CREATE_FAILED | AWS:CloudFront:CachePolicy | LambdaCache0E53A4C7 - Internal error reported from downstream service during operation 'AWS:CloudFront:CachePolicy'.
Yousef
11/11/2021, 3:45 PMFrank
Yousef
11/11/2021, 7:40 PMFrank
Yousef
11/11/2021, 8:51 PMFrank
Frank
// CachePolicyStack.js
if (scope.stage === "dev" || scope.stage === "prod") {
this.staticPolicy = new cf.CachePolicy();
this.imagePolicy = new cf.CachePolicy();
this.lambdaPolicy = new cf.CachePolicy();
}
else {
this.staticPolicy = cf.CachePolicy.fromId("dev-static-policy-id");
this.imagePolicy = cf.CachePolicy.fromId("dev-image-policy-id");
this.lambdaPolicy = cf.CachePolicy.fromId("dev-lambda-policy-id");
}
And then pass these policies to the Nextjs stack to use.Frank
Yousef
11/12/2021, 12:40 AM