diff --git a/packages/basic-auth/lib/basic-auth-construct.ts b/packages/basic-auth/lib/basic-auth-construct.ts index a0706c04..1bfa5d8d 100644 --- a/packages/basic-auth/lib/basic-auth-construct.ts +++ b/packages/basic-auth/lib/basic-auth-construct.ts @@ -19,11 +19,11 @@ export class BasicAuthFunction extends Construct { this, 'BasicAuthFunction', { - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', - code: Bundling.bundle({ + code: Bundling.bundle(this, { entry: `${__dirname}/handlers/basic-auth.ts`, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, sourceMap: true, projectRoot: `${__dirname}/handlers/`, depsLockFilePath: `${__dirname}/handlers/package-lock.json`, diff --git a/packages/cloudfront-security-headers/lib/index.ts b/packages/cloudfront-security-headers/lib/index.ts index e24b255a..a8fa9761 100644 --- a/packages/cloudfront-security-headers/lib/index.ts +++ b/packages/cloudfront-security-headers/lib/index.ts @@ -25,15 +25,15 @@ export class SecurityHeaderFunction extends Construct { this, 'SecurityHeaderFunction', { - code: Bundling.bundle({ + code: Bundling.bundle(this, { entry: `${__dirname}/handlers/security-header.ts`, - runtime: Runtime.NODEJS_14_X, + runtime: Runtime.NODEJS_16_X, sourceMap: true, projectRoot: `${__dirname}/handlers/`, depsLockFilePath: `${__dirname}/handlers/package-lock.json`, define: defineOptions } as any), // TODO fix typing - runtime: Runtime.NODEJS_14_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', } ); diff --git a/packages/geoip-redirect/lib/redirect-construct.ts b/packages/geoip-redirect/lib/redirect-construct.ts index 0b4e23d2..420f6bb4 100644 --- a/packages/geoip-redirect/lib/redirect-construct.ts +++ b/packages/geoip-redirect/lib/redirect-construct.ts @@ -22,9 +22,9 @@ export class RedirectFunction extends Construct { this, 'RedirectFunction', { - code: Bundling.bundle({ + code: Bundling.bundle(this, { entry: `${__dirname}/handlers/redirect.ts`, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, sourceMap: true, projectRoot: `${__dirname}/handlers/`, depsLockFilePath: `${__dirname}/handlers/package-lock.json`, @@ -37,7 +37,7 @@ export class RedirectFunction extends Construct { 'process.env.DEFAULT_REGION': JSON.stringify(options.defaultRegion), } } as any), - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', } ); diff --git a/packages/prerender-proxy/lib/error-response-construct.ts b/packages/prerender-proxy/lib/error-response-construct.ts index 9e7852a6..028f3e44 100644 --- a/packages/prerender-proxy/lib/error-response-construct.ts +++ b/packages/prerender-proxy/lib/error-response-construct.ts @@ -18,9 +18,9 @@ export class ErrorResponseFunction extends Construct { this, 'ErrorResponseFunction', { - code: Bundling.bundle({ + code: Bundling.bundle(this, { entry: `${__dirname}/handlers/error-response.ts`, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, sourceMap: true, projectRoot: `${__dirname}/handlers/`, depsLockFilePath: `${__dirname}/handlers/package-lock.json`, @@ -32,7 +32,7 @@ export class ErrorResponseFunction extends Construct { }, architecture: Architecture.X86_64 }), - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', } ); diff --git a/packages/prerender-proxy/lib/prerender-check-construct.ts b/packages/prerender-proxy/lib/prerender-check-construct.ts index 5cdb20e6..2484900a 100644 --- a/packages/prerender-proxy/lib/prerender-check-construct.ts +++ b/packages/prerender-proxy/lib/prerender-check-construct.ts @@ -13,15 +13,15 @@ export class PrerenderCheckFunction extends Construct { this, 'PrerenderCheckFunction', { - code: Bundling.bundle({ + code: Bundling.bundle(this, { entry: `${__dirname}/handlers/prerender-check.ts`, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, sourceMap: true, projectRoot: `${__dirname}/handlers/`, depsLockFilePath: `${__dirname}/handlers/package-lock.json`, architecture: Architecture.X86_64 }), - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', } ); diff --git a/packages/prerender-proxy/lib/prerender-construct.ts b/packages/prerender-proxy/lib/prerender-construct.ts index e1f6ef1d..0ae6505f 100644 --- a/packages/prerender-proxy/lib/prerender-construct.ts +++ b/packages/prerender-proxy/lib/prerender-construct.ts @@ -19,9 +19,9 @@ export class PrerenderFunction extends Construct { this, 'PrerenderFunction', { - code: Bundling.bundle({ + code: Bundling.bundle(this, { entry: `${__dirname}/handlers/prerender.ts`, - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, sourceMap: true, projectRoot: `${__dirname}/handlers/`, depsLockFilePath: `${__dirname}/handlers/package-lock.json`, @@ -34,7 +34,7 @@ export class PrerenderFunction extends Construct { }, architecture: Architecture.X86_64 }), - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', } );