Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Cloud Functions
  • Getting started
    • Overview
    • Creating and executing functions
    • Creating a timer
    • Creating a trigger for Yandex Message Queue
    • Creating a trigger for Object Storage
    • Creating a trigger for Container Registry
    • Creating a trigger for Cloud Logs
    • Creating a trigger for IoT Core
  • Step-by-step instructions
    • All instructions
    • Using functions to get an IAM token for a service account
    • Managing rights to access functions
    • Managing functions
      • Creating a function
      • Managing function versions
      • Working in the code editor
      • Invoking a function
      • Updating a function
      • Viewing monitoring charts
      • Viewing the execution log
      • Deleting a function
    • Managing triggers
      • Getting information about a trigger
      • Creating a timer
      • Creating a trigger for Message Queue
      • Creating a trigger for Object Storage
      • Creating a trigger for Container Registry
      • Creating a trigger for Cloud Logs
      • Creating a trigger for Yandex IoT Core
      • Updating a trigger
      • Deleting a trigger
  • Concepts
    • Overview
    • Functions
    • Invoking a function
    • Runtime environment
      • Overview
      • Environment
      • Execution context
    • Builder
    • Triggers
      • Overview
      • Timer
      • Trigger for Message Queue
      • Trigger for Object Storage
      • Trigger for Container Registry
      • Trigger for Cloud Logs
      • Trigger for Yandex IoT Core
    • Log groups
    • Monitoring
    • Backups
    • Quotas and limits
  • Developing in Node.js
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Python
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Go
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in PHP
    • Overview
    • Managing dependencies
    • Request handlers
    • Invocation context
    • Logging
    • Handling errors
  • Developing in Bash
    • Overview
    • Request handlers
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in Java
    • Overview
    • Java programming model
      • Overview
      • Using the Function interface to set a handler function
      • Using the YcFunction interface to set a handler function
      • Using the HttpServlet class to set a handler
      • Using the SpringBootApplication annotation to set a handler
    • Managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Developing in R
    • Overview
    • R programming model
    • Building and managing dependencies
    • Request handler
    • context.md
    • Logging
    • Handling errors
  • Developing in C#
    • Overview
    • C# programming model
      • Overview
      • Using the Function interface to set a handler function
      • Using the YcFunction interface to set a handler function
    • Building and managing dependencies
    • Request handler
    • Invocation context
    • Logging
    • Handling errors
    • Using the SDK
  • Use cases
    • Creating skills for Alice
  • Pricing policy
  • Access management
  • API Functions reference
    • Authentication in the API
    • gRPC
      • Overview
      • FunctionService
      • OperationService
    • REST
      • Overview
      • Function
        • Overview
        • create
        • createVersion
        • delete
        • get
        • getVersion
        • getVersionByTag
        • list
        • listAccessBindings
        • listOperations
        • listRuntimes
        • listTagHistory
        • listVersions
        • removeTag
        • setAccessBindings
        • setTag
        • update
        • updateAccessBindings
  • API Triggers reference
    • Authentication in the API
    • gRPC
      • Overview
      • TriggerService
      • OperationService
    • REST
      • Overview
      • Trigger
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • pause
        • resume
        • update
  • Questions and answers
  1. Getting started
  2. Creating a trigger for Object Storage

Creating a trigger for Object Storage

  • Before you start
  • Create a trigger
  • What's next

Triggers is currently at the Preview stage.

Create a trigger for Object Storage that will run your function when you create, move, or delete an object in the bucket.

Before you start

To create a trigger, you need:

  1. Service account with rights for function call. If you don't have a service account, create one.
  2. Functions that the trigger will call. If you don't have a function:
    • Create a function.
    • Create a version of the function and upload the function code to it.

Create a trigger

Note

The trigger is initiated within 5 minutes of being created.

To create a trigger:

  1. Open Cloud Functions in the folder where you want to create a trigger for Object Storage.
  2. Go to the Triggers tab.
  3. Click Create trigger.
  4. Under Basic parameters:
    • Enter a name and description for the trigger.
    • In the Type field, select Object Storage.
  5. Under Object Storage settings:
    • In the Bucket field, select the bucket whose object events you want to create a trigger for.
    • In the Event types field, select the events.
    • (optional) In the Object key prefix field, enter a prefix for filtering.
    • (optional) In the Object key suffix field, enter a suffix for filtering.
  6. Under Repeat request settings:
    • In the Interval field, specify 5 seconds.
    • In the Message batch size field, enter 5.
  7. Under Function settings:
    • Select the function for the trigger to call.
    • Specify the function version tag.
    • Specify the service account that will be used to call the function.
  8. Click Create trigger.

What's next

  • Read about the concept of trigger.
  • Read more about the trigger for Object Storage.
  • For information about what you can do with triggers, see our step-by-step instructions.
In this article:
  • Before you start
  • Create a trigger
  • What's next
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC