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. 🎉
Unable to retrieve tweet with ID: 1196543520997171200
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.
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.
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.