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, nodejs18.x is deprecated; AWS first blocks creating new functions on the runtime, then blocks updating existing ones. nodejs16.x and earlier are already blocked. The error fires when 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.

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

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