Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ build: src/
make build_swagger
cp -r src/api/resources/ dist/api/resources
rm -rf dist/lambda/sqs
docker run --rm -v "$(shell pwd)/dist/lambda":/var/task public.ecr.aws/sam/build-nodejs22.x:latest \
docker run --rm -v "$(shell pwd)/dist/lambda":/var/task public.ecr.aws/sam/build-nodejs24.x:latest \
sh -c "npm i -g yarn && $(yarn_env) yarn $(yarn_install_params) && \
rm -rf node_modules/aws-crt/dist/bin/{darwin*,linux-x64*,linux-arm64-musl} && \
rm -rf node_modules/argon2/prebuilds/{darwin*,freebsd*,linux-arm,linux-x64*,win32-x64*} && \
rm -rf node_modules/argon2/prebuilds/linux-arm64/argon2.armv8.musl.node"

docker run --rm -v "$(shell pwd)/dist/sqsConsumer":/var/task public.ecr.aws/sam/build-nodejs22.x:latest \
docker run --rm -v "$(shell pwd)/dist/sqsConsumer":/var/task public.ecr.aws/sam/build-nodejs24.x:latest \
sh -c "npm i -g yarn && $(yarn_env) yarn $(yarn_install_params) && \
rm -rf node_modules/aws-crt/dist/bin/{darwin*,linux-x64*,linux-arm64-musl} && \
rm -rf node_modules/argon2/prebuilds/{darwin*,freebsd*,linux-arm,linux-x64*,win32-x64*} && \
Expand Down
2 changes: 1 addition & 1 deletion terraform/modules/archival/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ resource "aws_lambda_function" "api_lambda" {
role = aws_iam_role.archive_role.arn
architectures = ["arm64"]
handler = "dynamoStream.handler"
runtime = "nodejs22.x"
runtime = "nodejs24.x"
filename = data.archive_file.api_lambda_code.output_path
timeout = 90
memory_size = 512
Expand Down
8 changes: 4 additions & 4 deletions terraform/modules/lambdas/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ resource "aws_lambda_function" "api_lambda" {
role = aws_iam_role.api_role.arn
architectures = ["arm64"]
handler = "lambda.handler"
runtime = "nodejs22.x"
runtime = "nodejs24.x"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Node.js 22 vs Node.js 24 breaking changes compatibility

💡 Result:

Summary — main breaking changes when moving from Node.js 22 → 24

  1. Platform / binary support

    • Node no longer ships 32-bit Windows (since v23) and 32-bit Linux armv7 (v24). macOS pre-built binaries now require macOS 13.5+. [1]
  2. OpenSSL / crypto

    • Node 24 uses OpenSSL 3.5 (security level 2) — short/weak RSA/DSA/DH/ECC keys and RC4 cipher suites are prohibited. Test TLS/crypto workloads before upgrading. [1]
  3. V8, native addons and toolchain

    • V8 upgraded to 13.6 — C/C++ addons that use V8 APIs may need updates; C++20 support may be required (previously C++17). Prefer N-API to reduce rebuild work. Build toolchain minimums increased (e.g., gcc ≥ 12.2 on many Linux builds, Xcode ≥ 16.1 on macOS). [1][2]
  4. HTTP / fetch / Undici

    • Undici 7 and stricter fetch() spec compliance (and removal/changes of some blob/FormData/AbortController behaviors). HTTP client behavior may change; check code that relied on older Undici/fetch edge cases. [2][3]
  5. AsyncLocalStorage / async context

    • AsyncLocalStorage now uses AsyncContextFrame by default (performance and behavior differences); a flag (--no-async-context-frame) lets you revert temporarily. [2]
  6. Global APIs / runtime flags

    • URLPattern is global (no import needed). Permission model matured — CLI flag simplified to --permission and is more stable. [2]
  7. Behavioral and validation tightening

    • Stricter argument validation across APIs (fetch compliance, AbortSignal validation), stream/pipe errors more likely to throw, changed Buffer behavior, some path handling fixes on Windows. Expect tests to catch new exceptions. [1]
  8. Deprecations / runtime removals

    • Several legacy APIs deprecated/removed (legacy url.parse usage discouraged in favor of WHATWG URL, deprecated TLS methods, REPLServer/Zlib instantiation without new, SlowBuffer → Buffer.allocUnsafeSlow(), fs.* access-mode getters deprecation — use fs.constants). Codemods are provided for some changes. [1][2]
  9. Platform-specific runtime changes (examples)

    • AWS Lambda: Node.js 24 runtime drops some legacy behavior (e.g., callback-style handlers not supported in the new RIC). If deploying to Lambda, validate handler format. [4]

Quick upgrade checklist

  • Run Node.js v24 locally and run full test suites (CI).
  • Rebuild native modules; prefer N-API.
  • Test TLS/HTTPS integrations and keys/cipher suites.
  • Verify fetch/HTTP client behavior and any code depending on older Undici behavior.
  • Check for reliance on deprecated APIs (url.parse, SlowBuffer, fs access getters, deprecated TLS methods).
  • Validate deployment targets (OS/arch binaries, Lambda handler shape).

Sources: Node.js v22→v24 migration notes and release docs, OpenJS Foundation and ecosystem writeups, NodeSource and AWS runtime announcement. [1][2][3][4]

References
[1] Node.js v22 to v24 migration notes (Node.js project).
[2] “What’s New with Node.js 24” (OpenJS Foundation).
[3] NodeSource summary of Node.js 24 / Undici changes.
[4] AWS Compute Blog — Node.js 24 runtime for Lambda.


🌐 Web query:

AWS Lambda nodejs24.x runtime availability regions

💡 Result:

Node.js 24 (nodejs24.x) is available in all AWS Regions — including AWS GovCloud (US) and China Regions. [1][2]

Sources:
[1] AWS announcement: "AWS Lambda adds support for Node.js 24" (Nov 25, 2025).
[2] AWS CDK / Lambda runtimes listing showing NODEJS_24_X.


Test Lambda handler compatibility and validate TLS/HTTP client behavior with Node.js 24.

Four Lambda functions are being upgraded to nodejs24.x. While the runtime is available in all AWS regions, verify compatibility before merging:

  1. Lambda handler format: Node.js 24 removed support for callback-style handlers in the Lambda Runtime Interface Client (RIC). Confirm all four functions use async/Promise-based handlers, not callback(err, result) patterns.
  2. TLS/crypto: Node.js 24 enforces OpenSSL 3.5 security level 2, which prohibits weak RSA/DSA/DH/ECC keys and RC4 ciphers. Test any code making HTTPS requests or handling TLS certificates.
  3. HTTP/fetch: Undici 7 introduces stricter fetch() spec compliance. Validate fetch/HTTP client code, especially any code relying on edge cases or FormData/blob behavior.
  4. Native modules: If any dependencies use native C/C++ addons, they may require rebuilds for V8 13.6 compatibility; prefer N-API modules.

Run full test suites with Node.js 24 locally before deploying.

Also applies to: 383-383, 414-414, 513-513

🤖 Prompt for AI Agents
In terraform/modules/lambdas/main.tf around lines 354, 383, 414 and 513, you
bumped the runtime to nodejs24.x but the PR comment requests verification and
fixes for Node.js 24 incompatibilities: audit each Lambda's handler source to
ensure they export async/Promise-based handlers (remove or migrate any
callback(err,result) patterns), run the full test suite locally using Node.js 24
to exercise TLS/crypto and HTTP code paths, exercise any HTTPS requests and
certificate handling to confirm OpenSSL 3.5+ security level 2 compatibility
(replace weak keys/ciphers or strengthen certs), test code that uses
fetch/undici for spec compliance and update FormData/blob usage as needed,
rebuild any native addons (or replace with N-API modules) and update lockfiles,
and only merge after all unit/integration tests pass under Node.js 24.

filename = data.archive_file.api_lambda_code.output_path
timeout = 15
memory_size = 2048
Expand Down Expand Up @@ -380,7 +380,7 @@ resource "aws_lambda_function" "sqs_lambda" {
role = aws_iam_role.sqs_consumer_role.arn
architectures = ["arm64"]
handler = "index.handler"
runtime = "nodejs22.x"
runtime = "nodejs24.x"
filename = data.archive_file.sqs_lambda_code.output_path
timeout = 300
memory_size = 2048
Expand Down Expand Up @@ -411,7 +411,7 @@ resource "aws_lambda_function" "hicpu_lambda" {
role = aws_iam_role.api_role.arn
architectures = ["arm64"]
handler = "lambda.handler"
runtime = "nodejs22.x"
runtime = "nodejs24.x"
filename = data.archive_file.api_lambda_code.output_path
timeout = 15
memory_size = 4096 // This will get us 2 full CPU cores, which will speed up those cryptographic ops that require this server
Expand Down Expand Up @@ -510,7 +510,7 @@ resource "aws_lambda_function" "linkry_edge" {
function_name = "${var.ProjectId}-linkry-edge"
role = aws_iam_role.linkry_lambda_edge_role[0].arn
handler = "index.handler"
runtime = "nodejs22.x"
runtime = "nodejs24.x"
publish = true
timeout = 5
memory_size = 128
Expand Down
Loading