[Yandex Cloud documentation](../../../index.md) > [Yandex Serverless Containers](../../index.md) > [Concepts](../index.md) > Trigger > Overview

# Triggers in Serverless Containers. Overview

_Triggers_ are criteria that automatically launch a Serverless Containers [container](../container.md) 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 info %}

The trigger is initiated within five minutes after it is created.

{% endnote %}

The following types of triggers are available in Serverless Containers: 
* [Timer](timer.md)
* [Trigger for Message Queue](ymq-trigger.md)
* [Trigger for Object Storage](os-trigger.md)
* [Trigger for Container Registry](cr-trigger.md)
* [Trigger for Cloud Logging](cloud-logging-trigger.md)
* [Trigger for Yandex IoT Core](iot-core-trigger.md)
* [Trigger for budgets](budget-trigger.md)
* [Trigger for Data Streams](data-streams-trigger.md)
* [Email trigger](mail-trigger.md)

Each trigger type has its own conditions. For example, a trigger for Object Storage may fire when an object is [created](../../../storage/operations/objects/upload.md) or [updated](../../../storage/operations/objects/edit-acl.md). You can set some conditions in the service object settings, e.g., notification thresholds in the [budget](../../../billing/concepts/budget.md) settings would act as trigger conditions for budgets.

## Specifics of container invocations by triggers {#invoke}

Triggers invoke a container based on preset [quotas and limits](../limits.md).

When invoking a container with a trigger, the following considerations apply:

* You need to configure the container to return the `2xx` state code if invoked successfully. Other state codes will be interpreted as an invocation error followed by a retry attempt to invoke the container.
* Before delivering messages to the container, the trigger 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 which will invoke the container must have the `serverless-containers.containerInvoker` 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 grouping {#batch-messages}

You can configure the following triggers to batch messages before invoking a container:

* 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 invoke a container for a whole batch of messages rather than each message separately. To do this, specify the following trigger settings:

* **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 batching messages, see the guides for creating the relevant trigger.

## Container invocation retries {#invoke-retry}

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

* **Interval**: Invocation retry interval.
* **Number of attempts**: Number of container invocation retries before the trigger moves a message to the [dead letter queue](../dlq.md).

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

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

## Useful links {#see-also_}

* [Triggers that run a Cloud Functions](../../../functions/concepts/trigger/index.md) function
* [Triggers for sending messages to WebSocket connections](../../../api-gateway/concepts/trigger/index.md)