All Products
Search
Document Center

EventBridge:Route events to Function Compute

Last Updated:Feb 06, 2025

This topic describes how to create an event stream whose event target is Function Compute in the EventBridge console.

Before you start

Create an event stream

  1. Log on to the EventBridge console. In the left-side navigation pane, click Event Streams.

  2. In the top navigation bar, select a region and click Create Event Stream.

  3. On the Create Event Stream page, configure the Task Name and Description parameters and follow the on-screen instructions to configure other parameters. Then, click Save. The following section describes the parameters:

    • Task Creation

      1. In the Source, Filtering, and Transformation steps, configure the event source, event filtering method, and event transformation rule. Then, click Next Step. For information about the configurations of event transformation, see Use Function Compute to perform message cleansing.

      2. In the Sink step, set the Service Type parameter to Function Compute and follow the on-screen instructions to configure other parameters. The following table describes the parameters.

        Parameter

        Description

        Example

        Service Type

        The Function Compute service that you created.

        test

        Function

        The Function Compute function that you created.

        test

        Version and Alias

        Specify whether to use a specific version or a specific alias. Valid values: Specified Version and Specified Alias. If you select Specified Version, you must configure the Version parameter. If you select Specified Alias, you must configure the Alias parameter.

        • Specified Version

        • LATEST

        Invocation Mode

        The invocation method. Valid values:

        • Asynchronous

        • Synchronous

        Asynchronous

        Event Format

        The format in which events are delivered to the downstream function. Valid values:

        • Object: Events are delivered to the downstream function in objects.

        • ObjectList: Events are delivered to the downstream function in arrays.

        Note

        This parameter is optional. If you do not specify this parameter, events are delivered to downstream functions in the ObjectList format.

        Object

        Event

        The method that you want to use to transform events. For more information, see Event transformation.

        Complete Event

    • Task Property

      Configure the retry policy and dead-letter queue for the event stream. For more information, see Retry policies and dead-letter queues.

  4. Go back to the Event Streams page and find the event stream that you created. Then, click Enable in the Actions column.

    The event stream requires 30 to 60 seconds to be enabled. You can view the progress in the Status column on the Event Streams page.

Verify the result

  1. On the Event Streams page, find the event stream that you created and click the function name in the Event Target column.

    sdNZpLxUPC

  2. On the Function Details page, click the Logs tab. Then, click Function Logs to view the logs of the function.

    YMrtwIL4KG