Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Cloud Functions
  • Comparison 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 environment
    • 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
  • Release notes
  • FAQ

In this article:

  • Environment variables
  • Use cases
  • Certificate for accessing managed databases
  • User files
  • Dynamic libraries
  1. Concepts
  2. Runtime environment
  3. Environment

Environment

Written by
Yandex Cloud
Updated at April 18, 2025
  • Environment variables
    • Use cases
  • Certificate for accessing managed databases
  • 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

  • Status monitoring of geographically distributed devices
  • Sensor reading monitoring 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.

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
© 2025 Direct Cursus Technology L.L.C.