From 83e37e863ee6cb8ce8c02f6f9c47de5fd2c6bef5 Mon Sep 17 00:00:00 2001 From: J11522 <60687512+J11522@users.noreply.github.com> Date: Tue, 14 Nov 2023 14:44:26 +0100 Subject: [PATCH 1/3] Update default runtime docs Update docs for default runtime value to NODEJS_16_X --- packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts index 6df32bf9dc31f..c43715093b8e1 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts @@ -38,7 +38,7 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions { * The runtime environment. Only runtimes of the Node.js family are * supported. * - * @default Runtime.NODEJS_18_X + * @default Runtime.NODEJS_16_X */ readonly runtime?: lambda.Runtime; From e5ff3b65a5af8ad0a83af81443b429bc4ff1d0a1 Mon Sep 17 00:00:00 2001 From: J11522 <60687512+J11522@users.noreply.github.com> Date: Wed, 15 Nov 2023 11:24:53 +0100 Subject: [PATCH 2/3] Add logic explanation to default --- packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts index c43715093b8e1..05ba1950b540e 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts @@ -38,7 +38,7 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions { * The runtime environment. Only runtimes of the Node.js family are * supported. * - * @default Runtime.NODEJS_16_X + * @default Check if the feature flag is enabled and default to NODEJS_LATEST if so. Otherwise default to NODEJS_16_X. */ readonly runtime?: lambda.Runtime; From e9fb35a88a6cc50ead0344dd6ce37ab6a6252003 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Wed, 15 Nov 2023 11:15:35 +0000 Subject: [PATCH 3/3] Update packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts --- packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts index 05ba1950b540e..9dbc15420aee7 100644 --- a/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts +++ b/packages/aws-cdk-lib/aws-lambda-nodejs/lib/function.ts @@ -38,7 +38,7 @@ export interface NodejsFunctionProps extends lambda.FunctionOptions { * The runtime environment. Only runtimes of the Node.js family are * supported. * - * @default Check if the feature flag is enabled and default to NODEJS_LATEST if so. Otherwise default to NODEJS_16_X. + * @default `Runtime.NODEJS_LATEST` if the `@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion` feature flag is enabled, otherwise `Runtime.NODEJS_16_X` */ readonly runtime?: lambda.Runtime;