AWS Lambda

The runtime parameter of nodejs18.x is no longer supported for creating or updating AWS Lambda functions

The runtime parameter of nodejs18.x is no longer supported for creating or updating AWS Lambda functions

What it means

AWS Lambda is blocking create/update operations on a deprecated Node.js runtime.

Why it happens

Per the AWS Lambda runtime deprecation table, nodejs16.x and nodejs18.x are both deprecated (patches stopped) and share the same block dates: AWS blocks creating new functions on 2027-02-01 and updating existing ones on 2027-03-03 (AWS delayed both beyond the usual 30/60 days, in a cluster with nodejs20.x and several Python runtimes). The error fires once a deploy targets a runtime past its block date.

How to fix it

  1. Move to a supported runtime — AWS recommends nodejs22.x.
  2. SAM/CloudFormation: `Runtime: nodejs22.x`. CDK: `runtime: lambda.Runtime.NODEJS_22_X`. Terraform: `runtime = "nodejs22.x"`. Serverless: `runtime: nodejs22.x`.
  3. Rebuild native addons for the Node 22 ABI and switch the bundled aws-sdk v2 to @aws-sdk v3 — see the related /fix pages.
  4. Redeploy and confirm with `aws lambda get-function-configuration --function-name <name> --query Runtime`.

Related deadline: Lambda Node.js 18 EOL2027-02-01.

Find every instance in your project

The free EOLkits scanner runs in your browser (nothing uploaded) and flags this and related breakages across your IaC and dependency files.

Prefer a 10-second check? Paste your config into the free AWS EOL checker — nothing uploaded.

Primary source: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Get the full migration audit — $299, hash-anchored PDF →