AWS Lambda now supports Node.js 26. The announcement, posted on 20 November 2026, says you can use it as a managed runtime for both Lambda Web Functions and Lambda Event Functions, and as a base container image for Event Functions. Node.js 26 is the current long-term support line, and AWS expects it to receive security and bug fixes until April 2029.
This guide covers what the new runtime gives you, the changes that can break older functions, and how to upgrade with the CLI, SAM and a container image. Sources: the AWS What’s New announcement, the Lambda runtimes table and Building Lambda Event Functions with Node.js.
The runtime at a glance
| Item | Value (from AWS docs) |
|---|---|
| Runtime identifier | nodejs26.x |
| Operating system | Amazon Linux 2023 |
| Deprecation date | 30 April 2029 |
| Block function create | 1 June 2029 |
| Block function update | 1 July 2029 |
| Availability | All Regions where Web Functions and Event Functions are available |
AWS applies runtime and base image updates automatically. The runtime also works with Powertools for AWS Lambda (TypeScript) and with the usual tools: the console, AWS CLI, AWS SAM, AWS CDK and CloudFormation.
What you get from Node.js 26
The AWS announcement highlights two things you can use straight away:
- The Temporal API for date, time and time-zone handling, without a library.
- Enhancements to the Fetch API.
Here’s a handler that uses Temporal to work out business-day cut-offs in India time. Previously you’d have reached for a date library to do this safely:
// index.mjs
export const handler = async (event) => {
const nowIst = Temporal.Now.zonedDateTimeISO("Asia/Kolkata");
// Orders after 6 PM IST ship the next day
const cutoff = nowIst.with({ hour: 18, minute: 0, second: 0, millisecond: 0 });
const shipDate = Temporal.ZonedDateTime.compare(nowIst, cutoff) > 0
? nowIst.add({ days: 1 }).toPlainDate()
: nowIst.toPlainDate();
return {
statusCode: 200,
body: JSON.stringify({
now: nowIst.toString(),
shipDate: shipDate.toString(),
}),
};
};
Temporal objects are immutable, and time-zone maths (including DST, for zones that use it) is handled by the runtime instead of by your code.
Because the runtime’s global fetch is built in, many functions no longer need axios or node-fetch for simple HTTP calls, which keeps bundles and cold starts smaller:
export const handler = async () => {
const res = await fetch("https://api.example.com/health", {
signal: AbortSignal.timeout(3000),
});
return { statusCode: res.status };
};
Before you upgrade: three things to check
1. Callback-style handlers don’t work
The Lambda docs state that callback-based function handlers are only supported up to Node.js 22. From Node.js 24 onwards, you must use async handlers. If you’re jumping from nodejs20.x or nodejs22.x straight to nodejs26.x, search for handlers like this:
// ❌ Not supported on nodejs24.x and later
export const handler = (event, context, callback) => {
doWork(event, (err, result) => {
if (err) return callback(err);
callback(null, result);
});
};
and convert them:
// ✅ async handler
import { promisify } from "node:util";
const doWorkAsync = promisify(doWork);
export const handler = async (event) => {
return await doWorkAsync(event);
};
A quick way to find candidates in a repo:
grep -rnE "handler\s*=\s*(async\s*)?\(\s*event\s*,\s*context\s*,\s*callback" src/
Also remove any reliance on context.callbackWaitsForEmptyEventLoop, which belongs to the callback model.
2. The bundled AWS SDK version isn’t the latest
All supported Node.js runtimes include a specific minor version of the AWS SDK for JavaScript v3, which can vary by runtime version and Region. If your code depends on a recent SDK feature, bundle your own @aws-sdk/* packages rather than relying on the runtime copy. To see which version you have, AWS suggests a tiny function:
import packageJson from "@aws-sdk/client-s3/package.json" with { type: "json" };
export const handler = async () => packageJson.version;
3. Native modules must be rebuilt
If you ship native add-ons (for example sharp, bcrypt or database drivers with native bindings), rebuild them for Node.js 26 on Amazon Linux 2023. Building inside a matching container image is the safest approach. Pure-JavaScript dependencies don’t need this.
Upgrading with the AWS CLI
For a single function, change the runtime identifier:
aws lambda update-function-configuration \
--function-name orders-api \
--runtime nodejs26.x
Then invoke it and check the logs before shifting traffic. If you use aliases, publish a new version and move a weighted alias gradually:
aws lambda publish-version --function-name orders-api
aws lambda update-alias --function-name orders-api --name live \
--routing-config '{"AdditionalVersionWeights":{"NEW_VERSION":0.1}}'
Replace NEW_VERSION with the version number returned by publish-version.
Upgrading with AWS SAM
In template.yaml, set the runtime globally so you don’t miss a function:
Globals:
Function:
Runtime: nodejs26.x
Architectures: [arm64]
Timeout: 10
Resources:
OrdersApi:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
CodeUri: src/
sam build && sam deploy
If you bundle with esbuild through SAM, update the target to match the new runtime (for example Target: node26 in your BuildProperties), so the bundler doesn’t down-level syntax the runtime already supports.
Container images
Node.js 26 is also available as a Lambda base image for Event Functions. Update the FROM line in your Dockerfile to the Node.js 26 Lambda base image listed in the AWS docs, rebuild, push to ECR and update the function’s image URI. AWS patches the base image, but you only get those patches when you rebuild and redeploy, so add a scheduled rebuild to your pipeline.
Experimental Node.js features
Lambda disables some experimental Node.js features by default for stability. On earlier runtimes, the docs list examples such as require() of ES modules and automatic ES/CommonJS module detection, with flags you can re-enable through NODE_OPTIONS. Check the Node.js runtime page for the current list for Node.js 26 before relying on any experimental behaviour. AWS also notes that functions using experimental features aren’t eligible for the Lambda SLA or AWS Support.
A safe upgrade checklist
- Run your test suite locally on Node.js 26.
- Convert any callback handlers to
async. - Rebuild native modules on Amazon Linux 2023.
- Bundle your own AWS SDK clients if you need recent features.
- Update the runtime in your IaC (SAM, CDK, CloudFormation or Terraform), not just the console.
- Deploy to a staging alias, compare errors and duration, then shift traffic gradually.
Key takeaways
- Use the runtime identifier
nodejs26.x(Amazon Linux 2023), supported until April 2029. - Node.js 26 brings the Temporal API and Fetch improvements to Lambda.
- Callback-style handlers stopped working at Node.js 24, so convert them before upgrading from 20 or 22.
- Upgrade through IaC and shift traffic gradually using versions and aliases.
