Developing in Node.js. Overview
With Cloud Functions, you can run applications written in Node.js
This service provides several runtimes with different versions. We do not recommend using runtime versions that are no longer supported.
| Name | Node.js version | SDK version Yandex Cloud |
Operating system |
Preloaded | Supported by Cloud Functions |
|---|---|---|---|---|---|
| nodejs10 | 10.16.3 | 1.3.3 | Ubuntu 18.04 | No | No |
| nodejs12 | 12.22.10 | 1.3.3 | Ubuntu 18.04 | No | No |
| nodejs14 | 14.19.0 | 1.3.3 | Ubuntu 18.04 | No | No |
| nodejs16 | 16.14.1 | None | Ubuntu 18.04 | Yes | No |
| nodejs18 | 18.16.1 | None | Ubuntu 22.04 LTS | Yes | No |
| nodejs22 | 22.15.0 | None | Ubuntu 22.04 LTS | Yes | Yes |
Note
A function may behave differently in preloaded and standard runtimes. To learn about function behavior, see Preloaded runtime environment.
Some runtimes have an SDK library pre-installed by default to work with the Yandex Cloud API. For more info on how to use the SDK, see Using the SDK.
When creating a new function version, Cloud Functions will automatically install all declared dependencies required for the function. For more information about requirements and limitations, see Managing Node.js function dependencies.
The runtime automatically loads your code and invokes the request handler you specified. It receives the incoming request and the invocation context as arguments. The context contains additional information about the function parameters.
Cloud Functions automatically catches the application's standard output streams and sends them to the centralized logging system in Yandex Cloud. This system also logs entries about the start and end of each function execution, as well as any errors that occur during execution. For more information about the log format, see Node.js function execution logging.
To learn more about programming in JavaScript or how certain constructs work, see this JavaScript tutorial