From 26999a12b6d574cfa19c8e1752ed7c086a173d94 Mon Sep 17 00:00:00 2001 From: Swopnil Dangol Date: Thu, 20 Nov 2025 16:37:56 +0000 Subject: [PATCH 1/4] Upgrade dev env to Node 24 --- .devcontainer/devcontainer.json | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/workflows/bootstrap_region.yml | 2 +- .github/workflows/make-release.yml | 2 +- .github/workflows/make-version.yml | 2 +- .github/workflows/publish-package.yml | 2 +- .github/workflows/publish_layer.yml | 2 +- .github/workflows/quality_check.yml | 10 +++++----- .../reusable-run-linting-check-and-unit-tests.yml | 4 ++-- .github/workflows/reusable_deploy_layer_stack.yml | 2 +- .github/workflows/reusable_publish_docs.yml | 2 +- .github/workflows/run-e2e-tests.yml | 6 +++--- .nvmrc | 2 +- docs/contributing/setup.md | 2 +- docs/contributing/testing.md | 2 +- docs/features/logger.md | 2 +- docs/features/metrics.md | 2 +- docs/features/tracer.md | 6 +++--- docs/getting-started/lambda-layers.md | 13 +++++++------ docs/upgrade.md | 4 ++-- examples/app/template.yaml | 2 +- examples/snippets/batch/templates/sam/dynamodb.yaml | 2 +- examples/snippets/batch/templates/sam/kinesis.yaml | 2 +- examples/snippets/batch/templates/sam/sqs.yaml | 2 +- .../appsync-events/templates/gettingStarted.yaml | 2 +- .../templates/gettingStartedSam.yaml | 2 +- .../bedrock-agents/templates/gettingStartedCdk.ts | 2 +- .../bedrock-agents/templates/gettingStartedSam.yaml | 2 +- .../event-handler/rest/templates/api_gateway.yml | 2 +- .../event-handler/rest/templates/lambda_furl.yml | 2 +- examples/snippets/idempotency/templates/cacheCdk.ts | 4 ++-- .../snippets/idempotency/templates/cacheSam.yml | 2 +- .../snippets/idempotency/templates/tableSam.yaml | 2 +- .../templates/advancedBatchSizeConfiguration.yaml | 2 +- .../kafka/templates/gettingStartedWithMsk.yaml | 2 +- layers/package.json | 1 + layers/src/layer-publisher-stack.ts | 8 ++++++-- layers/tests/unit/layer-publisher.test.ts | 2 +- packages/batch/package.json | 1 + packages/event-handler/package.json | 1 + packages/idempotency/package.json | 1 + packages/kafka/package.json | 1 + packages/logger/package.json | 1 + packages/metrics/package.json | 1 + packages/parameters/package.json | 1 + packages/parser/package.json | 1 + packages/testing/src/constants.ts | 5 +++-- packages/testing/src/helpers.ts | 2 +- packages/tracer/package.json | 1 + packages/validation/package.json | 1 + 50 files changed, 74 insertions(+), 56 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c288b8895f..42a899ded4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,7 @@ // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local arm64/Apple Silicon. "args": { - "VARIANT": "22-bullseye" + "VARIANT": "24-bullseye" } }, "customizations": { diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 956f81860a..800cf21170 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -67,6 +67,7 @@ body: attributes: label: AWS Lambda function runtime options: + - 24.x - 22.x - 20.x validations: diff --git a/.github/workflows/bootstrap_region.yml b/.github/workflows/bootstrap_region.yml index 873cc2497e..fdb5dbb415 100644 --- a/.github/workflows/bootstrap_region.yml +++ b/.github/workflows/bootstrap_region.yml @@ -49,7 +49,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version: 24 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 - id: credentials diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index 3f6206c30a..9075b019b6 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -50,7 +50,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version: 24 cache: "npm" registry-url: 'https://registry.npmjs.org' - name: Setup auth tokens diff --git a/.github/workflows/make-version.yml b/.github/workflows/make-version.yml index ec1907b8b6..f5050c2bba 100644 --- a/.github/workflows/make-version.yml +++ b/.github/workflows/make-version.yml @@ -25,7 +25,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest env: - NODE_VERSION: "22" + NODE_VERSION: "24" outputs: RELEASE_VERSION: ${{ steps.version-n-changelog.outputs.new-version }} steps: diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 45c6ca292b..ed74019d3b 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -41,7 +41,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version: 24 cache: "npm" registry-url: 'https://registry.npmjs.org' - name: Setup auth tokens diff --git a/.github/workflows/publish_layer.yml b/.github/workflows/publish_layer.yml index d040fe055f..71067cdb81 100644 --- a/.github/workflows/publish_layer.yml +++ b/.github/workflows/publish_layer.yml @@ -44,7 +44,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version: 24 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 - name: CDK build diff --git a/.github/workflows/quality_check.yml b/.github/workflows/quality_check.yml index 319b730890..728a0f1414 100644 --- a/.github/workflows/quality_check.yml +++ b/.github/workflows/quality_check.yml @@ -19,7 +19,7 @@ jobs: NODE_ENV: dev strategy: matrix: - version: [20, 22] + version: [20, 22, 24] workspace: [ "packages/batch", "packages/commons", @@ -68,7 +68,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: 22 + node-version: 24 cache: "npm" - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 @@ -86,7 +86,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: 22 + node-version: 24 cache: "npm" - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 @@ -104,7 +104,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: 22 + node-version: 24 cache: "npm" - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 @@ -120,7 +120,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: 22 + node-version: 24 cache: "npm" - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 diff --git a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml index 79bdaf99b8..5da7db879e 100644 --- a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml +++ b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml @@ -39,7 +39,7 @@ jobs: NODE_ENV: dev strategy: matrix: - version: [20, 22] + version: [20, 22, 24] workspace: [ "packages/batch", "packages/commons", @@ -92,7 +92,7 @@ jobs: name: Setup Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: 22 + node-version: 24 cache: "npm" - &setup_dependencies name: Setup dependencies diff --git a/.github/workflows/reusable_deploy_layer_stack.yml b/.github/workflows/reusable_deploy_layer_stack.yml index c0937fce4f..9b055e276a 100644 --- a/.github/workflows/reusable_deploy_layer_stack.yml +++ b/.github/workflows/reusable_deploy_layer_stack.yml @@ -83,7 +83,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version: 24 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 - name: Download artifact diff --git a/.github/workflows/reusable_publish_docs.yml b/.github/workflows/reusable_publish_docs.yml index eaf2a49590..3e8b628fe8 100644 --- a/.github/workflows/reusable_publish_docs.yml +++ b/.github/workflows/reusable_publish_docs.yml @@ -54,7 +54,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: "22" + node-version: 24 cache: "npm" - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 397677dff9..11abc5af58 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -35,7 +35,7 @@ jobs: packages/tracer, layers, ] - version: [20, 22] + version: [20, 22, 24] arch: [x86_64, arm64] fail-fast: false steps: @@ -53,11 +53,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: - node-version: '22' + node-version: 24 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@3b5b8e2e58b7af07994be982e83584a94e8c76c5 # v1.5.0 with: - node-version: '22' + node-version: 24 - name: Setup AWS credentials uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: diff --git a/.nvmrc b/.nvmrc index deed13c016..941ea4863d 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/jod +lts/krypton \ No newline at end of file diff --git a/docs/contributing/setup.md b/docs/contributing/setup.md index f3671355c6..32b7092137 100644 --- a/docs/contributing/setup.md +++ b/docs/contributing/setup.md @@ -25,7 +25,7 @@ graph LR Unless you're using the pre-configured Cloud environment, you'll need the following installed: * [GitHub account](https://github.com/join){target="_blank" rel="nofollow"}. You'll need to be able to fork, clone, and contribute via pull request. -* [Node.js 22.x](https://nodejs.org/download/release/latest-v22.x/){target="_blank" rel="nofollow"}. The repository contains an `.nvmrc` file, so if you use tools like [nvm](https://github.com/nvm-sh/nvm#nvmrc), [fnm](https://github.com/Schniz/fnm) you can switch version quickly. +* [Node.js 24.x](https://nodejs.org/download/release/latest-v24.x/){target="_blank" rel="nofollow"}. The repository contains an `.nvmrc` file, so if you use tools like [nvm](https://github.com/nvm-sh/nvm#nvmrc), [fnm](https://github.com/Schniz/fnm) you can switch version quickly. * [npm 10.x](https://www.npmjs.com/). We use it to install dependencies and manage the workspaces. * [Docker](https://docs.docker.com/engine/install/){target="_blank" rel="nofollow"}. We use it to run documentation, and non-JavaScript tooling. * [Fork the repository](https://github.com/aws-powertools/powertools-lambda-typescript/fork). You'll work against your fork of this repository. diff --git a/docs/contributing/testing.md b/docs/contributing/testing.md index 771b0b2db0..ab833fd3e4 100644 --- a/docs/contributing/testing.md +++ b/docs/contributing/testing.md @@ -74,7 +74,7 @@ To run integration tests you'll need to set up an AWS account and obtain credent * `npm test:e2e -ws` to run all the integration tests for all the modules sequentially * `test:e2e:parallel` to run all the integration tests for all the modules in parallel * `npm test:e2e -w packages/metrics` to run all the integration tests for the `metrics` module -* `npm run test:e2e:nodejs22x -w packages/metrics` to run all the integration tests for the `metrics` module using the `nodejs22x` runtime +* `npm run test:e2e:nodejs24x -w packages/metrics` to run all the integration tests for the `metrics` module using the `nodejs24x` runtime The tests will deploy the necessary AWS resources using AWS CDK, and will run the Lambda functions using the AWS SDK. After that, the tests will verify the Lambda functions behave as expected by checking logs, metrics, traces, and other resources as needed. Finally, the tests will destroy all the AWS resources created at the beginning. diff --git a/docs/features/logger.md b/docs/features/logger.md index 833389cade..7e97f6ad4c 100644 --- a/docs/features/logger.md +++ b/docs/features/logger.md @@ -75,7 +75,7 @@ Check API docs to learn more about [Logger constructor options](https://docs.aws ShoppingCartApiFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Environment: Variables: POWERTOOLS_LOG_LEVEL: WARN diff --git a/docs/features/metrics.md b/docs/features/metrics.md index 6f1392e8d1..8bfed4986a 100644 --- a/docs/features/metrics.md +++ b/docs/features/metrics.md @@ -93,7 +93,7 @@ The `Metrics` utility is instantiated outside of the Lambda handler. In doing th HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Environment: Variables: POWERTOOLS_SERVICE_NAME: orders diff --git a/docs/features/tracer.md b/docs/features/tracer.md index 1ac01700f0..b61297ad68 100644 --- a/docs/features/tracer.md +++ b/docs/features/tracer.md @@ -63,7 +63,7 @@ To use it in an ESM project, you can instruct your bundler to use the `require` super(scope, id, props); const handler = new NodejsFunction(this, 'helloWorldFunction', { - runtime: Runtime.NODEJS_22_X, + runtime: Runtime.NODEJS_24_X, handler: 'handler', entry: 'src/index.ts', bundling: { @@ -90,7 +90,7 @@ To use it in an ESM project, you can instruct your bundler to use the `require` HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Handler: src/index.handler Metadata: BuildMethod: esbuild @@ -140,7 +140,7 @@ The `Tracer` utility is instantiated outside of the Lambda handler. In doing thi HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/docs/getting-started/lambda-layers.md b/docs/getting-started/lambda-layers.md index 0624964ea6..940b7ce0cd 100644 --- a/docs/getting-started/lambda-layers.md +++ b/docs/getting-started/lambda-layers.md @@ -110,7 +110,8 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi "Version": 24, "CompatibleRuntimes": [ "nodejs20.x", - "nodejs22.x" + "nodejs22.x", + "nodejs24.x" ], "LicenseInfo": "MIT-0", "CompatibleArchitectures": [ @@ -142,7 +143,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi ); new NodejsFunction(this, 'Function', { - runtime: Runtime.NODEJS_22_X, + runtime: Runtime.NODEJS_24_X, // Add the Layer to a Lambda function layers: [powertoolsLayer], code: Code.fromInline(`...`), @@ -191,7 +192,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi ); new NodejsFunction(this, 'Function', { - runtime: Runtime.NODEJS_22_X, + runtime: Runtime.NODEJS_24_X, // Add the Layer to a Lambda function layers: [powertoolsLayer], code: Code.fromInline(`...`), @@ -281,7 +282,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi function_name = "lambda_function_name" role = ... handler = "index.handler" - runtime = "nodejs22.x" + runtime = "nodejs24.x" layers = ["arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:40"] source_code_hash = filebase64sha256("lambda_function_payload.zip") } @@ -298,7 +299,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi resource "aws_lambda_function" "test_lambda" { ... - runtime = "nodejs22.x" + runtime = "nodejs24.x" layers = [data.aws_ssm_parameter.powertools_version.value] } @@ -323,7 +324,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi tracingConfig: { mode: 'Active' }, - runtime: aws.lambda.Runtime.NodeJS22dX, + runtime: aws.lambda.Runtime.NodeJS24dX, handler: 'index.handler', role: role.arn, architectures: ['x86_64'] diff --git a/docs/upgrade.md b/docs/upgrade.md index 5136d8c225..1c2ddd9f81 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -78,7 +78,7 @@ Here is an example using `esbuild` bundler. super(scope, id, props); const handler = new NodejsFunction(this, 'helloWorldFunction', { - runtime: Runtime.NODEJS_22_X, + runtime: Runtime.NODEJS_24_X, handler: 'handler', entry: 'src/index.ts', bundling: { @@ -105,7 +105,7 @@ Here is an example using `esbuild` bundler. HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Handler: src/index.handler Metadata: BuildMethod: esbuild diff --git a/examples/app/template.yaml b/examples/app/template.yaml index 5f634f372e..958a83f86f 100644 --- a/examples/app/template.yaml +++ b/examples/app/template.yaml @@ -10,7 +10,7 @@ Transform: AWS::Serverless-2016-10-31 # https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html Globals: Function: - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Architectures: - arm64 diff --git a/examples/snippets/batch/templates/sam/dynamodb.yaml b/examples/snippets/batch/templates/sam/dynamodb.yaml index 16164f1ad5..1c42414b79 100644 --- a/examples/snippets/batch/templates/sam/dynamodb.yaml +++ b/examples/snippets/batch/templates/sam/dynamodb.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/batch/templates/sam/kinesis.yaml b/examples/snippets/batch/templates/sam/kinesis.yaml index 55db822e90..1184996079 100644 --- a/examples/snippets/batch/templates/sam/kinesis.yaml +++ b/examples/snippets/batch/templates/sam/kinesis.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/batch/templates/sam/sqs.yaml b/examples/snippets/batch/templates/sam/sqs.yaml index 484b7c937d..08a0d01ecd 100644 --- a/examples/snippets/batch/templates/sam/sqs.yaml +++ b/examples/snippets/batch/templates/sam/sqs.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml b/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml index ead3874653..d38161f025 100644 --- a/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml +++ b/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml @@ -5,7 +5,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml b/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml index 6d0c0ddee5..1d68a7d270 100644 --- a/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml +++ b/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Environment: Variables: # Powertools for AWS Lambda (TypeScript) env vars: https://docs.aws.amazon.com/powertools/typescript/latest/environment-variables/ diff --git a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts index 192a00472f..d37894c4ac 100644 --- a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts +++ b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts @@ -24,7 +24,7 @@ export class BedrockAgentsStack extends Stack { const fn = new NodejsFunction(this, 'AirlineAgentFunction', { functionName: fnName, logGroup, - runtime: Runtime.NODEJS_22_X, + runtime: Runtime.NODEJS_24_X, entry: './src/index.ts', handler: 'handler', bundling: { diff --git a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml index aa531aab24..c4b4ea766f 100644 --- a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml +++ b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml @@ -5,7 +5,7 @@ Globals: Function: Timeout: 30 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Resources: HelloWorldFunction: diff --git a/examples/snippets/event-handler/rest/templates/api_gateway.yml b/examples/snippets/event-handler/rest/templates/api_gateway.yml index 056f84d413..c9c84443fe 100644 --- a/examples/snippets/event-handler/rest/templates/api_gateway.yml +++ b/examples/snippets/event-handler/rest/templates/api_gateway.yml @@ -19,7 +19,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/event-handler/rest/templates/lambda_furl.yml b/examples/snippets/event-handler/rest/templates/lambda_furl.yml index 1770b5a278..89044f6599 100644 --- a/examples/snippets/event-handler/rest/templates/lambda_furl.yml +++ b/examples/snippets/event-handler/rest/templates/lambda_furl.yml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs22.x + Runtime: nodejs24.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/idempotency/templates/cacheCdk.ts b/examples/snippets/idempotency/templates/cacheCdk.ts index f1a6cbdf59..364fcbb805 100644 --- a/examples/snippets/idempotency/templates/cacheCdk.ts +++ b/examples/snippets/idempotency/templates/cacheCdk.ts @@ -54,7 +54,7 @@ export class ValkeyStack extends Stack { const valkeyLayer = new LayerVersion(this, 'ValkeyLayer', { removalPolicy: RemovalPolicy.DESTROY, compatibleArchitectures: [Architecture.ARM_64], - compatibleRuntimes: [Runtime.NODEJS_22_X], + compatibleRuntimes: [Runtime.NODEJS_22_X, Runtime.NODEJS_24_X], code: Code.fromAsset('./lib/layers/valkey-glide'), }); @@ -67,7 +67,7 @@ export class ValkeyStack extends Stack { const fn = new NodejsFunction(this, 'MyFunction', { functionName: fnName, logGroup, - runtime: Runtime.NODEJS_22_X, + runtime: Runtime.NODEJS_24_X, architecture: Architecture.ARM_64, memorySize: 512, timeout: Duration.seconds(30), diff --git a/examples/snippets/idempotency/templates/cacheSam.yml b/examples/snippets/idempotency/templates/cacheSam.yml index 4541651907..beaedfeb94 100644 --- a/examples/snippets/idempotency/templates/cacheSam.yml +++ b/examples/snippets/idempotency/templates/cacheSam.yml @@ -16,7 +16,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Handler: index.js VpcConfig: # (3)! SecurityGroupIds: diff --git a/examples/snippets/idempotency/templates/tableSam.yaml b/examples/snippets/idempotency/templates/tableSam.yaml index 38f1a4a06d..098823afc4 100644 --- a/examples/snippets/idempotency/templates/tableSam.yaml +++ b/examples/snippets/idempotency/templates/tableSam.yaml @@ -17,7 +17,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Handler: index.js Policies: - Statement: diff --git a/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml b/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml index 02a399b7dd..75634ef96b 100644 --- a/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml +++ b/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml @@ -2,7 +2,7 @@ Resources: OrderProcessingFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Handler: index.js Events: KafkaEvent: diff --git a/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml b/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml index 3a22c9328a..602912de60 100644 --- a/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml +++ b/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml @@ -4,7 +4,7 @@ Resources: KafkaConsumerFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs22.x + Runtime: nodejs24.x Handler: index.js Timeout: 30 Events: diff --git a/layers/package.json b/layers/package.json index c22a3a7939..821f9e6f6f 100644 --- a/layers/package.json +++ b/layers/package.json @@ -14,6 +14,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs20x": "echo 'Not Implemented'", "test:e2e:nodejs22x": "echo 'Not Implemented'", + "test:e2e:nodejs24x": "echo 'Not Implemented'", "test:e2e": "vitest --run tests/e2e", "build": "echo 'Not applicable, run `npx cdk synth` instead to build the stack'", "cdk": "cdk", diff --git a/layers/src/layer-publisher-stack.ts b/layers/src/layer-publisher-stack.ts index 7f35789f98..776f6d9dac 100644 --- a/layers/src/layer-publisher-stack.ts +++ b/layers/src/layer-publisher-stack.ts @@ -41,13 +41,17 @@ export class LayerPublisherStack extends Stack { this.lambdaLayerVersion = new LayerVersion(this, 'LambdaPowertoolsLayer', { layerVersionName: props?.layerName, description: `Powertools for AWS Lambda (TypeScript) version ${powertoolsPackageVersion}`, - compatibleRuntimes: [Runtime.NODEJS_20_X, Runtime.NODEJS_22_X], + compatibleRuntimes: [ + Runtime.NODEJS_20_X, + Runtime.NODEJS_22_X, + Runtime.NODEJS_24_X, + ], license: 'MIT-0', compatibleArchitectures: [Architecture.ARM_64, Architecture.X86_64], code: Code.fromAsset(resolve(__dirname), { bundling: { // This is here only because is required by CDK, however it is not used since the bundling is done locally - image: Runtime.NODEJS_22_X.bundlingImage, + image: Runtime.NODEJS_24_X.bundlingImage, // We need to run a command to generate a random UUID to force the bundling to run every time command: [`echo "${randomUUID()}"`], local: { diff --git a/layers/tests/unit/layer-publisher.test.ts b/layers/tests/unit/layer-publisher.test.ts index e45a16db65..7a8cadb4c4 100644 --- a/layers/tests/unit/layer-publisher.test.ts +++ b/layers/tests/unit/layer-publisher.test.ts @@ -20,7 +20,7 @@ describe('Class: LayerPublisherStack', () => { // Assess template.resourceCountIs('AWS::Lambda::LayerVersion', 1); template.hasResourceProperties('AWS::Lambda::LayerVersion', { - CompatibleRuntimes: ['nodejs20.x', 'nodejs22.x'], + CompatibleRuntimes: ['nodejs20.x', 'nodejs22.x', 'nodejs24.x'], LicenseInfo: 'MIT-0', /* CompatibleArchitectures: [ 'x86_64', diff --git a/packages/batch/package.json b/packages/batch/package.json index 743fc81122..d5ae36e20d 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -16,6 +16,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs20x": "echo 'Not Implemented'", "test:e2e:nodejs22x": "echo 'Not Implemented'", + "test:e2e:nodejs24x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/event-handler/package.json b/packages/event-handler/package.json index 05af637466..fec8ae3222 100644 --- a/packages/event-handler/package.json +++ b/packages/event-handler/package.json @@ -16,6 +16,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest run tests/e2e", + "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest run tests/e2e", "test:e2e": "npm run test:e2e:nodejs20x", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index ddbc0ea2cc..ad4abe876b 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", + "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/kafka/package.json b/packages/kafka/package.json index 65c181428c..773e4db572 100644 --- a/packages/kafka/package.json +++ b/packages/kafka/package.json @@ -16,6 +16,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs20x": "echo \"Not implemented\"", "test:e2e:nodejs22x": "echo \"Not implemented\"", + "test:e2e:nodejs24x": "echo \"Not implemented\"", "test:e2e": "echo \"Not implemented\"", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/logger/package.json b/packages/logger/package.json index b971014b14..9dd98049a2 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", + "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/metrics/package.json b/packages/metrics/package.json index d166c215d8..07073a3f8d 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", + "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 8af7cfa78c..0c51d2abca 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", + "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/parser/package.json b/packages/parser/package.json index 0d83b7f988..640b098ca2 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs20x": "echo 'Not implemented'", "test:e2e:nodejs22x": "echo 'Not implemented'", + "test:e2e:nodejs24x": "echo 'Not implemented'", "test:e2e": "echo 'Not implemented'", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/testing/src/constants.ts b/packages/testing/src/constants.ts index a306ffa9f4..f95779941a 100644 --- a/packages/testing/src/constants.ts +++ b/packages/testing/src/constants.ts @@ -3,14 +3,15 @@ import { Architecture, Runtime } from 'aws-cdk-lib/aws-lambda'; /** * The default AWS Lambda runtime to use when none is provided. */ -const defaultRuntime = 'nodejs22x'; +const defaultRuntime = 'nodejs24x'; /** * The AWS Lambda runtimes that are supported by the project. */ const TEST_RUNTIMES = { nodejs20x: Runtime.NODEJS_20_X, - [defaultRuntime]: Runtime.NODEJS_22_X, + nodejs22x: Runtime.NODEJS_22_X, + [defaultRuntime]: Runtime.NODEJS_24_X, } as const; /** diff --git a/packages/testing/src/helpers.ts b/packages/testing/src/helpers.ts index 4fdee898a2..af3a22807f 100644 --- a/packages/testing/src/helpers.ts +++ b/packages/testing/src/helpers.ts @@ -10,7 +10,7 @@ import { const isValidRuntimeKey = ( runtime: string ): runtime is keyof typeof TEST_RUNTIMES => - runtime in TEST_RUNTIMES || runtime === 'nodejs22x'; + runtime in TEST_RUNTIMES || runtime === 'nodejs24x'; const getRuntimeKey = (): keyof typeof TEST_RUNTIMES => { const runtime: string = process.env.RUNTIME || defaultRuntime; diff --git a/packages/tracer/package.json b/packages/tracer/package.json index 1947942f77..b218a39b89 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", + "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/validation/package.json b/packages/validation/package.json index 4ffb28cbea..bbef13f946 100644 --- a/packages/validation/package.json +++ b/packages/validation/package.json @@ -13,6 +13,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs20x": "echo \"Not implemented\"", "test:e2e:nodejs22x": "echo \"Not implemented\"", + "test:e2e:nodejs24x": "echo \"Not implemented\"", "test:e2e": "echo \"Not implemented\"", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", From 6d086dd9aded8eb80ca3e85df25165ce86615ac5 Mon Sep 17 00:00:00 2001 From: Swopnil Dangol Date: Thu, 20 Nov 2025 16:48:08 +0000 Subject: [PATCH 2/4] Updated e2e test script of event handler --- packages/event-handler/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/event-handler/package.json b/packages/event-handler/package.json index fec8ae3222..599d25ffc4 100644 --- a/packages/event-handler/package.json +++ b/packages/event-handler/package.json @@ -17,7 +17,7 @@ "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest run tests/e2e", - "test:e2e": "npm run test:e2e:nodejs20x", + "test:e2e": "vitest run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", "build": "npm run build:esm & npm run build:cjs", From 8a6fdb4a5d1aa27c86f80d0233670a2d1b1d6edd Mon Sep 17 00:00:00 2001 From: Swopnil Dangol Date: Thu, 20 Nov 2025 22:29:16 +0000 Subject: [PATCH 3/4] changed region to us-east-1 --- .github/workflows/run-e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 11abc5af58..9e1aa59961 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -62,7 +62,7 @@ jobs: uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: role-to-assume: ${{ secrets.E2E_IAM_ROLE_ARN }} - aws-region: eu-west-1 + aws-region: us-east-1 mask-aws-account-id: true - name: Run e2e ${{ matrix.package }}-${{ matrix.version }}-${{ matrix.arch }} env: From 99a1e2f4645fa316b689b4484ee622446b1e56e5 Mon Sep 17 00:00:00 2001 From: Swopnil Dangol Date: Thu, 20 Nov 2025 22:32:53 +0000 Subject: [PATCH 4/4] changed region back --- .github/workflows/run-e2e-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index 9e1aa59961..11abc5af58 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -62,7 +62,7 @@ jobs: uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0 with: role-to-assume: ${{ secrets.E2E_IAM_ROLE_ARN }} - aws-region: us-east-1 + aws-region: eu-west-1 mask-aws-account-id: true - name: Run e2e ${{ matrix.package }}-${{ matrix.version }}-${{ matrix.arch }} env: