"CloudQuery has freed up time, reduced friction and made teams autonomous". Discover how Reddit is using CloudQuery Register now ❯

CloudQuery

AWS
Cloud Infrastructure
Tutorials

Finding AWS Lambda Functions Affected by Node.js 20.x End-of-Life

You probably got an AWS Health notification titled "[Action Required] AWS Lambda Node.js 20.x end-of-life" and wondered which functions in your infrastructure are affected. With Lambda functions scattered across multiple AWS accounts and regions, tracking down every instance using the nodejs20.x runtime turns into a manual hunt through each account and region.
AWS is ending support for Node.js 20.x in Lambda on April 30, 2026, following the Node.js 20.x End-Of-Life schedule. Functions will continue running, but they'll be stuck on an unsupported runtime without security patches. By July 1, 2026, you won't be able to update these functions at all.
This post shows you how to use CloudQuery to identify all affected Lambda functions across your AWS accounts with a single SQL query, then walks through the upgrade process to Node.js 22.x.

What Is the Node.js 20.x End-of-Life Timeline? #

Node.js 20.x reaches end-of-life on April 30, 2026, when the Node.js community stops providing long-term support. AWS Lambda follows this schedule with a three-phase deprecation:
Phase 1: April 30, 2026 Lambda stops applying security patches to the Node.js 20.x runtime. Functions using nodejs20.x lose technical support eligibility. The runtime disappears from the AWS Console, though you can still create and update functions via AWS CLI, CloudFormation, SAM, or other tools.
Phase 2: June 1, 2026 You can't create new Lambda functions using the nodejs20.x runtime.
Phase 3: July 1, 2026 You can't update existing functions using the nodejs20.x runtime. This is the hard deadline for migrating to a supported runtime.
Your functions keep running after these dates, but running unsupported code in production creates security and compliance risks.

Finding Affected Lambda Functions with CloudQuery #

The AWS CLI requires you to query each region separately with commands like aws lambda list-functions --region us-east-1 --query "Functions[?Runtime=='nodejs20.x']". When you're managing dozens of accounts across multiple regions, this approach doesn't scale.
CloudQuery syncs your Lambda function data into a SQL database, letting you query across all accounts and regions at once.

Setup #

Download CloudQuery CLI and create a configuration file:
kind: source
spec:
  name: aws
  path: cloudquery/aws
  registry: cloudquery
  version: 'v32.48.3'
  tables: ['aws_lambda_functions']
  destinations: ['postgresql']
---
kind: destination
spec:
  name: postgresql
  path: cloudquery/postgresql
  registry: cloudquery
  version: 'v8.13.1'
  spec:
    connection_string: ${PG_CONNECTION_STRING}
Run the sync:
cloudquery sync config.yml
CloudQuery calls AWS Lambda's ListFunctions API across all configured accounts and regions, extracting configuration data including the Runtime field.

Query Node.js 20.x Functions #

After syncing, query for affected functions:
SELECT
    account_id,
    region,
    configuration->>'FunctionName' AS function_name,
    configuration->>'Runtime' AS runtime,
    arn
FROM
    aws_lambda_functions
WHERE
    configuration->>'Runtime' = 'nodejs20.x'
ORDER BY
    account_id, region, function_name;
This returns every Lambda function using nodejs20.x across your entire AWS infrastructure. Export the results to CSV for tracking or create a dashboard to monitor remediation progress.
For a count by account:
SELECT
    account_id,
    COUNT(*) AS affected_functions
FROM
    aws_lambda_functions
WHERE
    configuration->>'Runtime' = 'nodejs20.x'
GROUP BY
    account_id;

How Do I Upgrade Lambda Functions to Node.js 22.x? #

Node.js 22.x is the recommended upgrade path. Lambda supports Node.js 22.x with an EOL date of April 30, 2027, giving you another year of support.

Assess and Test #

Review your function code for breaking changes. Starting with Node.js 20, Lambda no longer loads additional CA certificates by default. If your function needs these certificates, set the NODE_EXTRA_CA_CERTS environment variable to /var/runtime/ca-cert.pem.
Test your function with Node.js 22.x locally before updating production. The AWS SDK v3 is recommended for new code, though v2 still works.

Upgrade Methods #

AWS Console: Open your function in the Lambda console, go to the "Code" tab, and change the runtime dropdown to "Node.js 22.x".
AWS CLI:
aws lambda update-function-configuration \
  --function-name your-function-name \
  --runtime nodejs22.x
Infrastructure as Code: Update your CloudFormation, CDK, or Terraform configuration to specify nodejs22.x and deploy.
After updating, invoke your function with test events to verify behavior. Monitor CloudWatch Logs for errors.

Key Takeaways: Node.js 20.x Lambda Migration #

Timeline and Impact:
  • Node.js 20.x reaches EOL on April 30, 2026
  • Security patches end immediately
  • Function updates blocked starting July 1, 2026
Detection Strategy:
  • CloudQuery provides multi-account visibility with SQL queries
  • Identify all nodejs20.x functions in minutes
  • Track remediation progress with dashboards
Remediation:
  • Upgrade to Node.js 22.x (supported until April 30, 2027)
  • Test for breaking changes, especially CA certificate handling
  • Update via Console, CLI, or Infrastructure as Code tools

Frequently Asked Questions #

What is the Node.js 20.x end-of-life date for AWS Lambda? #

Node.js 20.x reaches end-of-life in Lambda on April 30, 2026. After this date, AWS stops applying security patches and the runtime loses technical support eligibility.

Will my Lambda functions stop working after April 30, 2026? #

No, your functions continue running. However, they run on an unsupported runtime without security patches. Starting June 1, 2026, you can't create new nodejs20.x functions. Starting July 1, 2026, you can't update existing functions using this runtime.

How can I find all Lambda functions using Node.js 20.x across multiple AWS accounts? #

CloudQuery syncs Lambda function data into a SQL database, letting you query all accounts and regions with a single SQL statement. The query filters the aws_lambda_functions table where Runtime equals nodejs20.x.

How long does it take to upgrade a Lambda function runtime? #

The runtime update itself takes seconds via the AWS Console or CLI. Testing your code for compatibility with Node.js 22.x depends on your function's complexity and dependencies. Simple functions might need no changes, while functions with custom certificates or specific SDK usage require testing.

What is the difference between Node.js 20.x and Node.js 22.x? #

Node.js 22.x includes performance improvements and new JavaScript features. The main change affecting Lambda is CA certificate handling. Node.js 22.x doesn't load additional CA certificates by default. Set NODE_EXTRA_CA_CERTS=/var/runtime/ca-cert.pem if your function needs them.
Ready to identify your affected Lambda functions? Try CloudQuery and gain visibility across your AWS infrastructure. Contact us or join our Community to connect with other users and explore CloudQuery's full capabilities.

Related posts

Turn cloud chaos into clarity

Find out how CloudQuery can help you get clarity from a chaotic cloud environment with a personalized conversation and demo.


© 2025 CloudQuery, Inc. All rights reserved.