DEV Community

Cover image for The runtime parameter of nodejs14.x is no longer supported for creating or updating AWS Lambda functions
Nick Triantafillou
Nick Triantafillou

Posted on

1

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

On the 25th of February, 2024, AWS made a change:

Starting January 25, 2024, you will no longer be able to update existing functions using the Node.js 14 runtime.

and if you attempt to do so, you hit this error:

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

But I'm not using nodejs14.x to create or update lambda functions.

Or am I?

I didn't think I was, my runtimes in AWS CodeBuild and Serverless Framework were all set to 16.. but I was using an extra component with serverless framework.. that component was https://www.npmjs.com/package/@sls-next/serverless-component

and internally somewhere.. this component uses lambda. And those Lambda functions were trying to be created with nodejs 14.

Thanks to an awesome comment I found on github I learned you can simply change your internal serverless-component runtime to nodejs20.x and it should fix your issues. It did for me.

blah:
  component: "@sls-next/serverless-component"
  stage: dev
  inputs:
    bucketName: ${env.AWS_S3_BUCKET}
    bucketRegion: ap-southeast-2
    cloudfront:
      distributionId: ${env.AWS_CFID}
    runtime:
      defaultLambda: 'nodejs20.x'
Enter fullscreen mode Exit fullscreen mode

Deploy, and the problem goes away.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more