16th August 2022

AWS withdrawing Lambda support for Node.js 12

Node.js 12 is being withdrawn as a supported runtime for AWS Lambda functions from 14th November 2022, so any Lambda functions currently using this runtime will need to be updated.
Server-side JavaScript Node.js Logo

Why is AWS no longer supporting Node.js version 12?

Node.js is an open-source JavaScript runtime that runs JavaScript code outside of a browser, as a server-side programming language. It's one of the many native runtimes that AWS Lambda can support, and Node.js is our server-side programming language of choice when creating serverless applications and websites. We build, deploy and maintain Node.js applications that run on Lambda functions within Amazon Web Services, so we're coding with Node.js and interacting with Lambda functions on a daily basis.

One of Lambda's most powerful features is that you just choose the runtime and major version and deploy your code - then AWS take care of all necessary updates, minor and patch versions. We don't need to maintain or monitor servers or patch server software, although using Lambda functions does mean monitoring in different ways.

Like all open-source software, Node.js has a release cycle with new versions being released and older versions deprecated periodically, to keep the library current and secure. Version 12 of Node.js reached end-of-life on April 30, 2022 - receiving no further updates or security patches - and so AWS are removing support for version 12 of Node.js in AWS Lambda and moving Lambda users up to newer versions of the runtime.

What is the schedule for AWS's withdrawal of Node.js 12 support?

AWS are deprecating Node.js 12 for AWS Lambda in two stages:

  1. Starting November 14, 2022, Lambda will no longer apply security patches and other updates to the Node.js 12 runtime used by Lambda functions, and functions using Node.js 12 will no longer be eligible for technical support. In addition, you will no longer be able to create new Lambda functions using the Node.js 12 runtime.
  2. Starting December 14, 2022, you will no longer be able to update existing functions using the Node.js 12 runtime.

Updating AWS Lambda functions from Node.js 12

Production applications should only use Active LTS or Maintenance LTS releases of Node.js, so while you could go up to Node.js 14, this version is already in maintenance long-term-support and only until 30th April 2023.

AWS added support for Node.js 16 in May 2022, and this is now the highest supported version of Node.js on AWS Lambda. As part of their Node.js 12 support notifications, AWS have advised to update Node.js 12 Lambda functions from to Node.js 16.

Unfortunately the lifecycle of Node.js 16 may be shorter than usual as the OpenJS Foundation have confirmed that they have brought forward the End-of-Life date for Node.js 16 by seven months.

Due to the end of support for OpenSSL 1.1.1 on September 11th 2023, Node.js 16 will also become end-of-Life on this date, which will undoubtedly also affect the AWS Lambda support schedule.

Screenshot of AWS Lambda console for Node.js 12 update

Our process for updating Lambda function runtime versions

Before updating our production Lambdas we'll follow a careful testing and deployment process. When moving from one major version to another there are a number of things to consider and steps to follow. The steps we'd work through would be something like this:

Local development: Provisioning our existing Lambda function code onto new runtimes locally, using Node Version Manager (nvm) to manage our local node version, and running the function code against the planned new version Node.js such as version 16.

Updating dependencies: Updating dependencies with Node Package Manager (npm) to ensure compatibility with the new Node.js version, then re-writing Lambda code and/or replacing incompatible dependencies.

Local testing: Writing and running tests and confirming expected behaviour between old and new versions of the functions and between the old Node.js 12 runtime and the latest 16.x runtime

Infrastructure-as-code updates: Updating our Cloudformation, SAM templates and custom deploy scripts to specify the new 16.x runtime for all Lambda functions

Deploying new Lambdas: Deploying the changes into our production environments and monitoring to ensure continued smooth operation


Read more about Node.js and the current releases at the Node.js website: https://nodejs.org/en/about/releases/

Read AWS's Runtime deprecation policy: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy

Do you have any thoughts on this article? Get in touch: hello@sinovi.uk

About the author

James Galley

An AWS-certified developer, James architects and produces cloud-based web applications using Amazon Web Services. Recent projects include high-throughput event driven applications using Kinesis and DynamoDB, fully serverless web applications powered by AWS Lambda and high-performance static sites deployed to S3.

Profile image of James Galley
contact us

We're here to help

Talk to us today about serverless development and application maintenance with Node.js and AWS Lambda. We can help you make your own Node.js 12 updates safely and securely.

We're a software development and cloud consultancy, operating as an outsourced technology partner for businesses - building, hosting and maintaining functional web based applications in the AWS cloud with trusted web technologies.

Discuss your next project