📊Tracking: [Lambda/Custom Resources] upgrade to Node 22 #33626
Labels
@aws-cdk/aws-lambda
Related to AWS Lambda
management/tracking
Issues that track a subject or multiple issues
p2
Overview
Node 20, which is currently in its Maintenance LTS phase, is slated to reach its End of Life on 2026-04-30, as indicated on https://nodejs.dev/en/about/releases/.
Our aim is to provide CDK users with sufficient preparation time to update their CDK code to the latest LTS Node version (Node 22) as older Node TS versions become unsupported for deployed resources such as Lambda and Custom Resources.
Lambda runtime: NODEJS_LATEST is not recommended, use NODEJS_22_X instead
Node 22 is supported in CDK but is not the default for Lambda as not every region supports 22 yet (at the time of writing 18 is the default), however Node 22 is available in Commercial, China and Gov Cloud regions. We recommend you use an explicit Node version such as NODEJS_22_X (rather than NODEJS_LATEST) for your lambda runtime. The default NODEJS_LATEST will be updated once all regions support Node 20 (or 22). (Documentation)
Custom resources
The default node version for custom resources is currently 20 for all regions except isolated regions. The default version will be changed to Node 22 before the end of June 2025.
Node Support summary
nodejs18.x EOL Apr 30, 2025 and support deprecated in Lambda Sep 1, 2025
nodejs20.x EOL Apr 30, 2026 and support deprecated in Lambda Apr 30, 2026
nodejs22.x EOL Apr 30, 2027 and support deprecated in Lambda Apr 30, 2027
Sources:
Node https://nodejs.dev/en/about/releases/.
Lambda https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
Link to the service’s CDK Construct Library API reference page.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Runtime.html
Maturity: CloudFormation Resources Only
Stable
Implementation
Issue list
The text was updated successfully, but these errors were encountered: