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
© 2025 Direct Cursus Technology L.L.C.
Yandex Serverless Containers
  • Comparing with other Yandex Cloud services
    • Overview
    • Container
    • Invoking a container
    • Asynchronous container invocation
    • Runtime environment
    • Networking
    • Mounting external resources to a container file system
    • Long-lived containers
    • Container termination notifications
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Yandex Cloud Logging
      • Trigger for Yandex IoT Core
      • Trigger for budgets
      • Trigger for Data Streams
      • Email trigger
    • Dead Letter Queue
    • Container logs
    • Backups
    • Quotas and limits
  • Access management
  • Tools
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Message batching
  • Roles required for the proper operation of a trigger for Yandex IoT Core
  • Yandex IoT Core trigger message format
  • Device
  • Broker
  • See also
  1. Concepts
  2. Trigger
  3. Trigger for Yandex IoT Core

Trigger for Yandex IoT Core that sends messages to the Serverless Containers container

Written by
Yandex Cloud
Updated at June 23, 2025
  • Message batching
  • Roles required for the proper operation of a trigger for Yandex IoT Core
  • Yandex IoT Core trigger message format
    • Device
    • Broker
  • See also

A trigger for Yandex IoT Core manages messages exchanged between devices, registries, and brokers. This trigger is created for topics: it receives copies of messages from topics and sends those to a Serverless Containers container for processing.

The trigger must be in the same cloud as the device, registry, or broker whose topic it reads messages from.

You can create a trigger:

  • For a standard topic implemented by the service except for the $monitoring/<device_ID>/json topic.
  • For a topic with any subtopics and wildcards.
  • For an alias topic.

A trigger for Yandex IoT Core needs a service account to invoke the container.

For more information about creating a trigger for Yandex IoT Core, see Creating a trigger that will send messages to a Serverless Containers container from a Yandex IoT Core registry or device topic and Creating a trigger that will send messages to a Serverless Containers container from a Yandex IoT Core broker topic.

Message batchingMessage batching

The batching settings allow sending several messages to a container at the same time. They set a top limit on a message batch size and its accumulation time. For example, if the size of a message group is 3, the container can receive groups with 1 to 3 messages.

Roles required for the proper operation of a trigger for Yandex IoT CoreRoles required for the proper operation of a trigger for Yandex IoT Core

  • To create a trigger, you need a permission for the service account under which the trigger executes the operation. This permission comes with the iam.serviceAccounts.user and editor roles or higher.
  • To run a trigger, the service account needs the serverless.containers.invoker role for the folder with the container to be invoked by the trigger.

Read more about access management.

Yandex IoT Core trigger message formatYandex IoT Core trigger message format

Before copying a message to a container, the trigger converts the copy to the below format.

DeviceDevice

{
    "messages": [
        {
            "event_metadata": {
                 "event_id": "2153b5d2-c6af-4c69-a28d-74ce********",
                 "event_type": "yandex.cloud.events.iot.IoTMessage",
                 "created_at": "2019-09-25T15:51:17.872320525Z"
            },
            "details": {
                 "registry_id": "arenou2oj4ct********",
                 "device_id": "areqjd6un3af********",
                 "mqtt_topic": "$devices/areqjd6un3af********/events",
                 "payload": "VGVz****"
            }
        },
        {
            "event_metadata": {
                 "event_id": "2153b5d2-c6af-4c69-a28d-74ce********",
                 "event_type": "yandex.cloud.events.iot.IoTMessage",
                 "created_at": "2019-09-25T15:51:17.872320525Z"
            },
            "details": {
                 "registry_id": "arenou2oj4ct********",
                 "device_id": "areqjd6un3af********",
                 "mqtt_topic": "$devices/areqjd6un3af********/events",
                 "payload": "VGVz****"
            }
        }
    ]
}

BrokerBroker

{
   "messages":[
      {
         "event_metadata":{
            "event_id":"2153b5d2-c6af-4c69-a28d-74ce********",
            "event_type":"yandex.cloud.events.iot.IoTMessage",
            "created_at":"2019-09-25T15:51:17.872320525Z"
         },
         "details":{
            "broker_id":"arenou2oj4ct********",
            "mqtt_topic":"broker/topic",
            "payload":"VGVz****"
         }
      },
      {
         "event_metadata":{
            "event_id":"2153b5d2-c6af-4c69-a28d-74ce********",
            "event_type":"yandex.cloud.events.iot.IoTMessage",
            "created_at":"2019-09-25T15:51:17.872320525Z"
         },
         "details":{
            "broker_id":"arenou2oj4ct********",
            "mqtt_topic":"broker/topic",
            "payload":"VGVz****"
         }
      }
   ]
}

See alsoSee also

  • Trigger for Yandex IoT Core that sends messages to a Cloud Functions function
  • Trigger for Yandex IoT Core that sends messages to WebSocket connections

Was the article helpful?

Previous
Trigger for Yandex Cloud Logging
Next
Trigger for budgets
© 2025 Direct Cursus Technology L.L.C.