AWS lambda documentation change
Summary
Updated Node.js version references from 20 to 22 throughout the documentation, including runtime requirements, directory paths, and CLI commands
Security assessment
The changes update documentation to reflect Node.js 22 usage but do not explicitly mention security vulnerabilities, patches, or security features. While Node.js version updates often include security improvements, the diff itself contains no direct references to security fixes or advisories.
Diff
diff --git a/lambda/latest/dg/typescript-layers.md b/lambda/latest/dg/typescript-layers.md index 7b6f76067..467d67e34 100644 --- a//lambda/latest/dg/typescript-layers.md +++ b//lambda/latest/dg/typescript-layers.md @@ -26 +26 @@ To follow the steps in this section, you must have the following: - * [Node.js 20](https://nodejs.org/en/blog/release/v20.9.0) and the [npm](https://www.npmjs.com/) package manager. For more information about installing Node.js, see [Installing Node.js via package manager](https://nodejs.org/en/download/package-manager/) in the Node.js documentation. + * [Node.js 22](https://nodejs.org/en/blog/release/v22.11.0) and the [npm](https://www.npmjs.com/) package manager. For more information about installing Node.js, see [Installing Node.js via package manager](https://nodejs.org/en/download/package-manager/) in the Node.js documentation. @@ -35 +35 @@ Throughout this topic, we reference the [layer-nodejs](https://github.com/awsdoc -This sample application uses the Node.js 20 runtime. If you add additional dependencies to your layer, they must be compatible with Node.js 20. +This sample application uses the Node.js 22 runtime. If you add additional dependencies to your layer, they must be compatible with Node.js 22. @@ -41 +41 @@ When you package code in a Node.js layer, you specify the Lambda runtime environ -Lambda Node.js runtimes specify their Node.js version and operating system. In this document, you will use the Node.js 20 runtime, which is based on AL2023. For more information about runtime versions, see [Supported runtimes](./lambda-runtimes.html#runtimes-supported). When you create a Lambda function, you specify the instruction set architecture. In this document, you will use the `arm64` architecture. For more information about architectures in Lambda, see [Selecting and configuring an instruction set architecture for your Lambda function](./foundation-arch.html). +Lambda Node.js runtimes specify their Node.js version and operating system. In this document, you will use the Node.js 22 runtime, which is based on AL2023. For more information about runtime versions, see [Supported runtimes](./lambda-runtimes.html#runtimes-supported). When you create a Lambda function, you specify the instruction set architecture. In this document, you will use the `arm64` architecture. For more information about architectures in Lambda, see [Selecting and configuring an instruction set architecture for your Lambda function](./foundation-arch.html). @@ -65 +65 @@ For example, the resulting layer .zip file that you create in this tutorial has - └ node20 + └ node22 @@ -71 +71 @@ For example, the resulting layer .zip file that you create in this tutorial has -You will put the [`lodash`](https://www.npmjs.com/package/lodash) library in the `nodejs/node20/node_modules` directory. This ensures that Lambda can locate the library during function invocations. +You will put the [`lodash`](https://www.npmjs.com/package/lodash) library in the `nodejs/node22/node_modules` directory. This ensures that Lambda can locate the library during function invocations. @@ -111 +111 @@ This script runs `npm install`, which reads your `package.json` and downloads th -This script copies the contents from the `node_modules` directory into a new directory named `nodejs/node20`. It then zips the contents of the `nodejs` directory into a file named `layer_content.zip`. This is the .zip file for your layer. You can unzip the file and verify that it contains the correct file structure, as shown in the [Layer paths for Node.js runtimes](./nodejs-layers.html#nodejs-layer-paths) section. +This script copies the contents from the `node_modules` directory into a new directory named `nodejs/node22`. It then zips the contents of the `nodejs` directory into a file named `layer_content.zip`. This is the .zip file for your layer. You can unzip the file and verify that it contains the correct file structure, as shown in the [Layer paths for Node.js runtimes](./nodejs-layers.html#nodejs-layer-paths) section. @@ -115,2 +115,2 @@ This script copies the contents from the `node_modules` directory into a new dir - mkdir -p nodejs/node20 - cp -r node_modules nodejs/node20/ + mkdir -p nodejs/node22 + cp -r node_modules nodejs/node22/ @@ -124 +124 @@ This script copies the contents from the `node_modules` directory into a new dir -Take the `layer_content.zip` file that you generated in the previous section and upload it as a Lambda layer. You can upload a layer using the AWS Management Console or the Lambda API via the AWS Command Line Interface (AWS CLI). When you upload your layer .zip file, in the following [PublishLayerVersion](https://docs.aws.amazon.com/lambda/latest/api/API_PublishLayerVersion.html) AWS CLI command, specify `nodejs20.x` as the compatible runtime and `arm64` as the compatible architecture. +Take the `layer_content.zip` file that you generated in the previous section and upload it as a Lambda layer. You can upload a layer using the AWS Management Console or the Lambda API via the AWS Command Line Interface (AWS CLI). When you upload your layer .zip file, in the following [PublishLayerVersion](https://docs.aws.amazon.com/lambda/latest/api/API_PublishLayerVersion.html) AWS CLI command, specify `nodejs22.x` as the compatible runtime and `arm64` as the compatible architecture. @@ -129 +129 @@ Take the `layer_content.zip` file that you generated in the previous section and - --compatible-runtimes nodejs20.x \ + --compatible-runtimes nodejs22.x \ @@ -208 +208 @@ The sample [function code](https://github.com/awsdocs/aws-lambda-developer-guide - --runtime nodejs20.x \ + --runtime nodejs22.x \