Yandex Cloud
Search
Discuss with expertTry 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
      • Invoking a function
      • Invoking a function asynchronously
      • Authenticating when invoking a private function via HTTPS
    • 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. Invoking a function
  3. Invoking a function

Invoking a function

Written by
Yandex Cloud
Updated at May 14, 2026

To allow any user to invoke a function without providing an authorization header, make it public. For more information about access permissions, see Access management in Cloud Functions.

Invoking a functionInvoking a function

In our example, we will use the function described in Creating a function version.

Management console
HTTPS
CLI
  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 Testing tab.

  5. In the Version tag field, specify the function version to invoke.

  6. Under Payload template, select one of these options:

    • No template: Custom data format.
    • HTTPS invoke: Data format for a function that handles HTTPS requests. For more information, see Concepts.
    • Trigger for Message Queue: Data format for a function that is invoked by a trigger to process queue messages.
    • Skill for Alice: Data format for invoking a function that receives requests from Yandex Dialogs.
  7. In the Payload, enter the input data to test the function.

  8. Click Run test.

  9. You will see the test status under Test result in the Function status field. Note that the maximum function execution time before timeout, including first call initialization, is ten minutes.

  10. You will see the function execution result in the Function output field.

Note

Function invocations may be restricted by access policies.

You can find the function invocation link:

  • In the Link to invoke field. To get it, navigate to Cloud Functions in the management console and click the function row.
  • In the http_invoke_url parameter. To get it, run this command:
    yc serverless function get <function_name>
    

To find out the name or ID of a function, get the list of functions in the folder.

For security reasons, you can only call a function via HTTPS. Call it as a regular HTTPS request by pasting the function invocation link into your browser’s address bar. The link should have the following format:

https://functions.yandexcloud.net/<function_ID>

You can invoke a specific function version using the tag parameter. The function with the $latest tag is invoked by default.

  • Example of invoking a function with no additional parameters:

    https://functions.yandexcloud.net/<function_ID>
    

    The following response will appear on the page:

    Hello, World!
    
  • Example of invoking a function by adding the name parameter to the URL:

    https://functions.yandexcloud.net/<function_ID>?name=<username>
    

    The following response will appear on the page:

    Hello, Username!
    
  • Example of invoking a specific function version by adding the tag parameter to the URL:

    https://functions.yandexcloud.net/<function_ID>?tag=<version_tag>
    

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

You can invoke a specific function version using the --tag parameter. The function with the $latest tag is invoked by default.

To find out the name or ID of a function, get the list of functions in the folder.

  • Invoke the function by specifying a name for the greeting in the parameter:

    yc serverless function invoke <function_ID> -d '{"queryStringParameters": {"name": "Username"}}'
    

    Result:

    {"statusCode": 200, "headers": {"Content-Type": "text/plain"}, "isBase64Encoded": false, "body": "Hello, Username!"}
    
  • Invoke a specific function version using the --tag parameter:

    yc serverless function invoke <function_ID> --tag <version_tag>
    

To learn more about the function structure required for different invocation methods (HTTPS and CLI), see Invoking a function in Cloud Functions.

Was the article helpful?

Previous
Creating a function version
Next
Invoking a function asynchronously
© 2026 Direct Cursus Technology L.L.C.