Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • 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
    • All guides
    • Getting a service account IAM token using a function
    • Connecting to managed databases from a function
      • Adding environment variables
      • Specifying a cloud network
      • Providing Yandex Lockbox secrets
      • Allocating memory for the /tmp directory
      • Setting the number of concurrent function instance calls
      • Viewing monitoring charts
      • Migrating to the ru-central1-d availability zone
      • Deleting a function version
      • Deleting a function
    • Viewing operations with service resources
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ
  1. Step-by-step guides
  2. Managing a function
  3. Setting the number of concurrent function instance calls

Setting the number of concurrent function instance calls

Written by
Yandex Cloud
Updated at May 18, 2026

Number of calls processed concurrently by a single function instance (concurrency) cannot exceed the relevant quota. This setting is only available in specific runtime environments. For more information, see Concurrent function instance calls.

Management console
CLI
Terraform
API
  1. In the management console, navigate to the folder containing the function.
  2. Go to Cloud Functions.
  3. Select the function.
  4. Navigate to the Editor tab.
  5. Under Additional settings, in the Concurrent function instance calls section, check Enable and enter the number of concurrent function instance calls.
  6. Click Save changes.

To set the number of calls to be processed concurrently by a single function instance, run this command:

yc serverless function version create \
--function-name=<function_name> \
--runtime <runtime_environment> \
--entrypoint <entry_point> \
--concurrency 2 \
--execution-timeout 3s \
--source-path <path_to_ZIP_archive>

Where:

  • --function-name: Name of the function whose version you want to create.
  • --runtime: Function runtime.
  • --entrypoint: Entry point in <file_name_without_extension>.<handler_name> format.
  • --concurrency: Maximum number of calls processed concurrently by a single function instance.
  • --execution-timeout: Maximum function execution time before timeout.
  • --source-path: ZIP archive with the function code and required dependencies.

Result:

done (1s)
id: d4evvn8obisa********
function_id: d4elpv8pft63********
created_at: "2020-08-01T19:09:19.531Z"
runtime: nodejs18
entrypoint: index.handler
resources:
memory: "134217728"
execution_timeout: 3s
image_size: "4096"
status: ACTIVE
tags:
- $latest
log_options:
folder_id: b1g681qpemb4********
concurrency: "2"

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the relevant documentation on the Terraform website or its mirror.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To set the number of calls to be processed concurrently by a single function instance, set its concurrency as follows:

  1. In the configuration file, describe the resources you want to create:

    • yandex_function: Description of the function being created and its source code.
      • name: Function name.
      • user_hash: Any string to identify the function version. When you change the function, update this string as well. Updating this string triggers a function update.
      • runtime: Function runtime.
      • entrypoint: Entry point in <file_name_without_extension>.<handler_name> format.
      • memory: Amount of memory allocated to the function, in MB.
      • concurrency: Maximum number of calls processed concurrently by a single function instance.
      • execution_timeout: Maximum function execution time before timeout.
      • service_account_id: ID of the service account you want to use to invoke the function.
      • content: Function source code.
        • content.0.zip_filename: Name of the ZIP archive containing the function source code.

    Here is an example of the configuration file structure:

    provider "yandex" {
        token     = "<service_account_OAuth_token_or_static_key>"
        folder_id = "<folder_ID>"
        zone      = "ru-central1-a"
    }
    
    resource "yandex_function" "test-function" {
        name               = "<function_name>"
        user_hash          = "<hash>"
        runtime            = "<runtime>"
        entrypoint         = "<entry_point>"
        memory             = "128"
        concurrency        = "2"
        execution_timeout  = "10"
        service_account_id = "<service_account_ID>"
        content {
            zip_filename = "<path_to_ZIP_archive>"
        }
    }
    

    For more information about resource properties, see yandex_function.

  2. Validate your configuration using this command:

    terraform validate
    

    If the configuration is valid, you will get this message:

    Success! The configuration is valid.
    
  3. Run this command:

    terraform plan
    

    You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.

  4. Apply the configuration changes:

    terraform apply
    
  5. Type yes and press Enter to confirm the changes.

You can check that the concurrency parameter was added using the management console or this CLI command:

yc serverless function version get <version_ID>

To set the number of calls to be processed concurrently by a single function instance, create a function version using the createVersion REST API method for the Function resource or the FunctionService/CreateVersion gRPC API call. Add the concurrency field to the request body.

See alsoSee also

  • Scaling a function

Was the article helpful?

Previous
Mounting an ephemeral disk
Next
Adding a tag
© 2026 Direct Cursus Technology L.L.C.