Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Functions
  • Comparing with other Yandex Cloud services
    • Overview
    • Function
    • Invoking a function
    • Asynchronous function invocation
    • Long-lived functions
    • Function termination notifications
    • Networking
      • Overview
      • Environment
      • Execution context
      • Preloaded runtime
    • Mounting external resources to a function file system
    • Builder
    • Dead Letter Queue
    • Function logs
    • Backups
    • Quotas and limits
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Environment variables
  • Use cases
  • Certificate for accessing managed databases
  • Trusted root certificates
  • Python
  • Node.js
  • User files
  • Dynamic libraries
  1. Concepts
  2. Runtime
  3. Environment

Environment

Written by
Yandex Cloud
Updated at October 30, 2026
View in Markdown
  • Environment variables
    • Use cases
  • Certificate for accessing managed databases
  • Trusted root certificates
    • Python
    • Node.js
  • User files
  • Dynamic libraries

Environment variablesEnvironment variables

The table provides a list of environment variables defined in the Cloud Functions runtime and available to a function. You cannot override these.

Key Value
_HANDLER Handler location specified for the function.
AWS_LAMBDA_RUNTIME_API Runtime host and API port.
LAMBDA_RUNTIME_DIR Path to runtime libraries.
LAMBDA_TASK_ROOT Path to folder containing your function's files.
PATH Set of folders containing the executables.
LD_LIBRARY_PATH Set of folders containing the dynamic libraries.

You can add other environment variables when creating a function version. The limit for maximum environment variable size, including variable names, is 4 KB.

You cannot calculate environment variables. Environment variable values are string constants. You can only calculate these within function code.

You can retrieve environment variables using standard programming language tools.

Use casesUse cases

  • Monitoring the status of geographically distributed devices
  • Monitoring sensor readings and event notifications
  • Deploying a fault-tolerant architecture with preemptible VMs

Certificate for accessing managed databasesCertificate for accessing managed databases

The environment has an SSL certificate available for accessing managed databases from your code. The certificate is stored in the /usr/local/share/ca-certificates/yandex-internal-ca.crt file.

Trusted root certificatesTrusted root certificates

You can access the trusted certificate system store at /etc/ssl/certs/ca-certificates.crt. Apart from the standard public certificate authorities, it includes:

  • Russian Trusted Root CA.
  • Yandex Cloud's in-house certificate authority.

Trusted certificates are supported in all runtimes (Node.js 22, Python 3.12, PHP 8.2, Go 1.23, Java 21, Kotlin 2.0, .NET Core 8, R 4.3, Bash 22.04 and higher), while trusted certificate system stores, in all runtimes, except for Node.js and Python. For more information on working with trusted certificates in Node.js and Python, see the relevant sections below.

Code that uses a trusted certificate system store trusts the added certificates without any additional settings. You do not need to disable the TLS check. However, if the web site provides an incomplete certificate chain and does not provide an intermediate certificate, you need to add the missing intermediate certificate together with the function code.

PythonPython

The requests library verifies certificates against the certifi package bundle rather than the system store. In the Cloud Functions runtime, this bundle already includes the Russian CA root certificate and Yandex Cloud's in-house CA root certificate.

If you specify requests or certifi in the requirements.txt file, a copy of certifi will be installed in the function code during the build without any added certificates, and requests will use it instead of the preset one. In this case, explicitly specify the runtime bundle using one of these methods:

  • Add the REQUESTS_CA_BUNDLE function version's environment variable set to /function/runtime/yc-ca-bundle.crt.

  • Provide the bundle under verify when calling requests:

    import requests
    requests.get(url, verify="/function/runtime/yc-ca-bundle.crt")
    

Node.jsNode.js

Node.js does not use a trusted certificate system store; therefore, the runtime uses the NODE_EXTRA_CA_CERTS environment variable to provide the bundle path to it.

Do not set NODE_EXTRA_CA_CERTS in the function version's environment variables: Node.js reads this variable only when starting a process, and the set value will not apply. However, it will overwrite the value set by the runtime, and the function will stop trusting the added certificates.

To add an additional certificate to Node.js functions, enable it from code using the HTTP client or TLS context parameters.

User filesUser files

User files are stored in two directories:

  • /function/code: User's working directory. It contains all the code of your function and all the files uploaded as a ZIP archive. You can use a relative path to access it.

  • /tmp: Directory for temporary files. It is used by the service to optimize repeat function calls that are sequentially processed by one of its instances. When a function instance ceases to operate, the data is deleted from /tmp. The maximum size of temporary files is limited to 512 MB.

    When creating a function version, you can allocate some of the function instance's RAM for the tmp directory. The specified amount of RAM will thus be mounted as a RAM disk to the /tmp directory. A function version needs at least 1 GB of RAM.

    If you enable Allocate memory for the /tmp directory, preloaded runtime environments start as regular ones.

Dynamic librariesDynamic libraries

If a function requires dynamic libraries to operate, these can be uploaded as a ZIP archive, in the /shared-libs directory at the root of the archive. The directory will be added to the LD_LIBRARY_PATH environment variable.

The dynamic libraries must be assembled on Ubuntu 18.04 LTS and linked with libc 2.27.

Was the article helpful?

Previous
Overview
Next
Execution context
© 2026 Direct Cursus Technology L.L.C.