Overview
With Cloud Functions, you can run applications written in Node.js. The service provides several runtime environments with different versions:
Name | Node.js version | Yandex.Cloud SDK version |
Operating system |
---|---|---|---|
nodejs10 | 10.16.3 | 1.1.1 | Ubuntu 18.04 LTS |
nodejs12 | 12.11.1 | 1.1.1 | Ubuntu 18.04 LTS |
nodejs14 | 14.11.0 | 1.1.1 | Ubuntu 18.04 LTS |
The runtime environment has an SDK library installed by default to work with the Yandex.Cloud API. For more information about how to use the SDK, see Using the SDK.
When creating a new function version, Cloud Functions automatically installs all declared dependencies required for the function to run. For more information about requirements and restrictions, see Managing dependencies.
The runtime environment automatically loads your code and invokes the request handler you specified. It receives an incoming request and the invocation context as arguments. The context contains additional information about the function parameters.
Cloud Functions automatically captures standard application output streams and sends them to the centralized logging system available in Yandex.Cloud. This system also logs service records about the start and end of each function and any errors that occur during its execution. For more information about the log format, see Logging.
To learn more about how to write in JavaScript or how certain constructs work, see the Modern JavaScript tutorial.