Last month AWS announced the release of Node.js 12 for Lambda functions.
This means faster functions & new Node.js features. 🎉
Welcome to the #serveless dining experience for reinvent 2019. For your first course, we have three crisp new #awslambda language versions. *My* personal favorite is Java 11 , but the Node 12 is super fresh ! https://t.co/xWJ3A9eV47 #HowManyCourses pic.twitter.com/4AkIezMtaL
— Ajay Nair (@ajaynairthinks) November 18, 2019
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.
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.
Questions?
If you have questions, feel free to drop us a line in the Netlify Community forums.