Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • 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
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 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
    • Mounting external resources to a function file system
    • Builder
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Cloud Logging
      • Trigger for Yandex IoT Core
      • Trigger for budgets
      • Trigger for Data Streams
      • Email trigger
    • 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:

  • Specifics of functions invoked by triggers
  • Message batching
  • Function invocation retries
  • Use cases
  • See also
  1. Concepts
  2. Trigger
  3. Overview

Triggers in Cloud Functions. Overview

Written by
Yandex Cloud
Updated at June 23, 2025
  • Specifics of functions invoked by triggers
  • Message batching
  • Function invocation retries
  • Use cases
  • See also

Triggers are criteria that automatically start a Cloud Functions function when met. Triggers allow you to automate your work with other Yandex Cloud services, such as Yandex Object Storage, Yandex Message Queue, and Yandex Container Registry.

Note

The trigger is initiated within 5 minutes of being created.

The following types of triggers are available in Cloud Functions:

  • Timer
  • Trigger for Message Queue
  • Trigger for Object Storage
  • Trigger for Container Registry
  • Trigger for Cloud Logging
  • Trigger for Yandex IoT Core
  • Trigger for budgets
  • Trigger for Data Streams
  • Email trigger

Each trigger type has its own conditions. For example, a trigger for Object Storage may fire when an object is created or updated. You can set some conditions in the service object settings, e.g., notification thresholds in the budget settings would act as trigger conditions for budgets.

Specifics of functions invoked by triggersSpecifics of functions invoked by triggers

Triggers call functions based on preset quotas and limits.

When a function is called by a trigger, the following specifics apply:

  • Functions are always called by triggers with the ?integration=raw query string parameter. To learn more about function calls, see this guide.
  • Before the trigger delivers messages to a function, it changes their format. Each trigger type uses a message format of its own. Read more about this in the relevant trigger description.
  • The service account used to invoke the function needs the functions.functionInvoker role. Other roles required for the trigger to operate correctly depend on trigger type. Read more about this in the relevant trigger description.
  • If the trigger is suspended and then restarted by the user, it will not process any events that occurred during its idle time.

Message batchingMessage batching

You can configure the following triggers to batch messages before calling a function:

  • Trigger for Message Queue
  • Trigger for Cloud Logging
  • Trigger for Object Storage
  • Trigger for Container Registry
  • Trigger for Yandex IoT Core
  • Trigger for Data Streams
  • Email trigger

This way you can call a function for a whole batch of messages rather than each message separately. Specify the following in the trigger parameters:

  • Waiting time, s: Message batching time. The number of messages cannot exceed the specified batch size.
  • Batch size: Number of messages for batching.

For more information about message batching, see the guides for creating the relevant trigger.

Function invocation retriesFunction invocation retries

You can configure invoking a function again if the current attempt fails. Specify the following in the trigger parameters:

  • Interval: Invocation retry interval.
  • Number of attempts: Number of invocation retries before the trigger sends a message to the dead letter queue.

This setting is available for all trigger types except the trigger for Message Queue.

For more information about invocation retries, see the guide for creating the relevant trigger.

Use casesUse cases

  • Writing data from a device into a database
  • Streaming Yandex Cloud Postbox events to Yandex Data Streams and analyzing them with Yandex DataLens
  • Configuring responses in Yandex Cloud Logging and Cloud Functions
  • Writing load balancer logs to PostgreSQL
  • Running computations on a schedule in DataSphere
  • Creating a budget trigger that invokes a Cloud Functions function to stop VM instances
  • Converting a video to a GIF in Python

See alsoSee also

  • Triggers to run a Serverless Containers container
  • Triggers to send messages to WebSocket connections

Was the article helpful?

Previous
Builder
Next
Timer
© 2025 Direct Cursus Technology L.L.C.