From 0034613fbf086d5e634a9a09d4273025b9a647aa Mon Sep 17 00:00:00 2001 From: Thijs Daniels Date: Thu, 4 Jul 2024 12:18:28 +0200 Subject: [PATCH] fix(cdk-site-distribution): downgrade cloudfront function runtime --- .changeset/mighty-deers-lay.md | 5 +++++ .../cdk-site-distribution/src/constructs/SiteDistribution.ts | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .changeset/mighty-deers-lay.md diff --git a/.changeset/mighty-deers-lay.md b/.changeset/mighty-deers-lay.md new file mode 100644 index 00000000..4e547841 --- /dev/null +++ b/.changeset/mighty-deers-lay.md @@ -0,0 +1,5 @@ +--- +"@codedazur/cdk-site-distribution": patch +--- + +The CloudFront function runtime was downgraded to avoid rate limiting during deployment. diff --git a/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts b/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts index 2493b16e..43a63f93 100644 --- a/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts +++ b/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts @@ -10,7 +10,6 @@ import { Distribution, FunctionCode, FunctionEventType, - FunctionRuntime, IOrigin, PriceClass, ViewerProtocolPolicy, @@ -152,7 +151,6 @@ export class SiteDistribution extends Construct { return new CloudFrontFunction(this, "ViewerRequestFunction", { code: this.getHandlerChainCode(handlers, "request"), - runtime: FunctionRuntime.JS_2_0, }); } @@ -168,7 +166,6 @@ export class SiteDistribution extends Construct { return new CloudFrontFunction(this, "ViewerResponseFunction", { code: this.getHandlerChainCode(handlers, "response"), - runtime: FunctionRuntime.JS_2_0, }); }