All Products
Search
Document Center

EventBridge:Manage event rules

Last Updated:Mar 11, 2026

Event rules control how events flow through your system. Each rule defines a pattern to match incoming events and one or more targets to receive them -- such as Function Compute functions, message queues, or HTTP endpoints. When an event matches a rule's pattern, EventBridge delivers it to all configured targets automatically.

Each rule supports up to five targets, all of which must be in the same region as the rule.

Prerequisites

Before you begin, make sure that you have:

  • An activated EventBridge service

  • The required permissions granted to a Resource Access Management (RAM) user

For setup instructions, see Activate EventBridge and grant permissions to a RAM user.

Create an event rule

Creating an event rule involves three steps:

  1. Define basic info -- name and describe the rule.

  2. Set up the event pattern -- specify which events to match.

  3. Configure targets -- choose where to send matched events.

To start, navigate to the Event Rules page:

  1. Log on to the EventBridge console.

  2. In the left-side navigation pane, click Event Buses.

  3. In the top navigation bar, select a region.

  4. On the Event Buses page, click the name of the event bus where the rule belongs.

  5. In the left-side navigation pane, click Event Rules.

Step 1: Define basic info

  1. On the Event Rules page, click Create Rule.

  2. In the Configure Basic Info step, enter a rule name in the Name field and a description in the Description field.

  3. Click Next Step.

Step 2: Set up the event pattern

In the Configure Event Pattern step, select an Event Source Type and configure the pattern:

  • Alibaba Cloud Service Event Sources: Select an Alibaba Cloud service from the Event Source drop-down list and an event type from the Event Type drop-down list.

    Note

    Events from Alibaba Cloud services cannot be published to custom event buses. If the current event bus is a custom event bus, this option is unavailable.

  • Custom Event Source: Select a custom event source from the Event Source drop-down list and specify an event pattern in the Pattern Content code editor. For pattern syntax and examples, see Event patterns.

Click Next Step after configuring the event pattern.

Step 3: Configure event targets

In the Configure Targets step, add one or more event targets. Each target defines a downstream service that receives matched events.

Important

Each event rule supports a maximum of five event targets, and all targets must reside in the same region as the rule.

The following target types are available:

Target typeDescription
Function ComputeProcess events with serverless functions. Learn more
ApsaraMQ for RocketMQStore and forward events through message queues. Learn more
ApsaraMQ for RabbitMQStore and forward events through AMQP-based messaging. Learn more
Simple Message Queue (formerly MNS) (SMQ)Store events in lightweight message queues. Learn more
EventBridgeFilter and transform events before forwarding to another event bus. Learn more
HTTP gatewaySend events to an HTTP endpoint for custom processing
HTTPS gatewaySend events to an HTTPS endpoint for custom processing
Direct MailDeliver event notifications by email. Learn more
DingTalkSend event notifications through DingTalk messages
ApsaraDB RDS for MySQLStore and forward events to a managed MySQL database. Learn more
Self-managed MySQL databaseStore and forward events to your own MySQL database

To reshape event data before delivery, select an event transformation method. For details, see Event transformation.

Click Create to finish.

View event rule details

  1. On the Event Rules page, find the rule and click Details in the Operations column.

The Rule Detail page shows the rule's basic information, event pattern, and configured event targets.

Modify an event rule

Modify event targets

  1. On the Event Rules page, find the rule and click Edit Targets in the Operations column.

  2. On the Edit Rule page, update the event target configurations.

  3. Click OK.

Modify the event pattern

  1. On the Event Rules page, find the rule and click Edit Pattern in the Operations column.

  2. On the Edit Rule page, update the Event Source and Pattern Content parameters.

  3. Click OK.

Disable, enable, or delete an event rule

Disable an event rule

Warning

Disabling an event rule may cause dependent services to become unavailable.

  1. On the Event Rules page, find the rule and choose More > Disable in the Operations column.

  2. In the Note message, click OK.

  3. In the Verify Account Security dialog box, click Obtain Verification Code, enter the code in the Verification Code field, and then click OK.

Enable an event rule

  1. On the Event Rules page, find the rule and choose More > Enable in the Operations column.

  2. In the Note message, click OK.

Delete an event rule

Warning

Deleting an event rule is irreversible. The data in the event rule cannot be restored.

  1. On the Event Rules page, find the rule and choose More > Delete in the Operations column.

  2. In the Note message, click OK.

  3. In the Verify Account Security dialog box, click Obtain Verification Code, enter the code in the Verification Code field, and then click OK.

What to do next

After creating an event rule:

  • Refine the event pattern: If the rule captures too many or too few events, modify the event pattern to adjust the filter criteria. See Event patterns.

  • Transform events: Apply event transformation to reshape event payloads before they reach the target. See Event transformation.

  • Add more targets: Add up to five event targets per rule to fan out events across multiple services.