Netlify raises $105M Series D to build a better web. We are hiring! Join our mission.

By David Wells in News & Announcements

Node.js 12 now available for Netlify Functions

Last month AWS announced the release of Node.js 12 for Lambda functions.

This means faster functions & new Node.js features. 🎉

Starting today, all new sites will be using Node.js 12 as the default function runtime. All existing sites can update to Node.js 12 for Netlify Functions via the instructions below.

What’s new?

Node.js 12 brings performance improvements and many new language features. In tests like the one charted below (source), Node.js 12 is almost catching up to Go! 🤯 Zoom zoom.

Bar graph of test results in requests per second, increasing from less than 20,000 with Node v4.9.1 to over 25,000 with Node v12.2.0, compared with just under 30,000 with Go v1.10.4

For more information on Node.js 12, check out this post and the official Node.js 12 changelog

How to upgrade existing site functions

To take advantage of the newer Node.js runtime with functions on sites created before December 4, 2019, you will need to set the AWS_LAMBDA_JS_RUNTIME environment variable to nodejs12.x in the Netlify site settings under Build & deploy > Environment > Environment variables.

After setting the environment variable, update your function code to trigger a new deployment.


If you have questions, feel free to drop us a line in the Netlify Community forums.