---
Title: Route targets
URL Source: https://company-skill.com/p/eb/eb-route-targets
Language: en
Description: You want to define conditions (Event Pattern) under which incoming events should be routed from an Event Bus to one or more Target Types—such as Function Compute, HTTP/HTTPS endpoints, or messaging…
---

# Route targets

Part of **EventBridge**. Route queries via `POST https://company-skill.com/api/route`.

## What You Want to Do

You want to define conditions (Event Pattern) under which incoming events should be routed from an Event Bus to one or more Target Types—such as Function Compute, HTTP/HTTPS endpoints, or messaging services—and ensure the routing behaves as expected.

**Typical User Questions**:
- Function Compute
- How to route events to an HTTP endpoint?
- Can I send events to HTTPS securely?
- Is it possible to route events via API?

## Decision Tree

Pick the best path for your situation:

- **If** you need to programmatically create, update, or manage **hundreds of event rules** (e.g., via CI/CD or GitOps) → Use API (go to *eb/eb-event-routing*)
- **If** you are **debugging or validating a single rule** and want to use the **Send Event** button to test live → Use (go to *eb/eb-event-routing*)
- **If** your workflow requires **version-controlled JSON rule definitions** stored in a code repository → Use API (go to *eb/eb-event-routing*)
- **Otherwise (default)** → Start with ****, especially if you're a non-developer, doing one-off setup, or exploring EventBridge for the first time.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| API | medium | Yes | Yes | API 1000–10000 | `eb/api/eb-event-routing` |
| Console / Dashboard | low | No | No | 100,000 | `eb/guide/eb-event-routing` |

## Path Details

### Path 1: API 

**Brief Description**: EventBridge Event Routing API REST It supports defining **Event Pattern** in JSON and routing matched events to targets like **Function Compute** or HTTP endpoints. A key capability is the **Test Event Pattern Match** API, which validates whether a sample event matches your rule logic before deployment.

**Key technical facts**:
- Billing: API 1000-10000 
- Auth method: AccessKey ID AccessKey Secret Authorization 'acs <AccessKeyId>:<Signature>'
- Regions available: cn-hangzhou, cn-shanghai

- Git JSON 
- Python/Java/Go SDK

### Path 2: Console / Dashboard
**Brief Description**: EventBridge to **Create Event Rule**, define **Event Pattern**, select **Target Type** (e.g., **Function Compute**, DingTalk, email), and **Add Target**. You can also use the **Send Event** button on a **Custom Event Source** to simulate events and verify routing. Rules are tied to an **Event Bus**, and each rule has a unique **Rule Name** that cannot be changed after creation.

**Key technical facts**:
- Billing: 100,000 
- Auth method: SSO
- Prerequisites: , RAM eventbridge:PutRule

**When to Use**:
- 'Send Event' 

## FAQ

Q: Which path should I start with?
A: If you're learning, debugging, or setting up fewer than 10 rules, start with the **console**. If you're building a production system with many rules or need Git integration, start with the **API**.

Q: What if I need to route events to 80 different targets but used the console?
A: You’ll hit the **50-target limit per rule** in the console. The API path supports up to 100 targets, so you’d need to split across multiple rules or switch to API.

Q: What if I’m a developer who wants to test a rule quickly but chose the API path?
A: You’ll miss the **Send Event** button and must manually construct test payloads and call **Test Event Pattern Match**, increasing iteration time compared to the console’s one-click test.

Q: Can I change the Rule Name after creating it in the console?
A: No — **Rule Name** is immutable once set in the console. If you need renaming, you must delete and recreate the rule (which triggers a **Verification Code** confirmation).

Q: Does the API support testing event patterns?
A: Yes — the **Test Event Pattern Match** API lets you validate if a sample event matches your pattern, but you must provide both the pattern and event as JSON.

Q: Are there cost differences between the two paths?
A: Yes — the console offers **100,000 free calls/month**, while the API only gives **1,000–10,000 free calls/month** depending on operation type. High-volume manual testing via API could incur charges faster.

Q: Can I use the console to route events to a private VPC HTTP endpoint?
A: Yes, but you must manually configure **VPC, vSwitch, and security group** — a complex process. The API allows the same but doesn’t simplify it; neither path auto-discovers VPC resources.

## Related queries

route events, event routing, send event to target, configure event rule, match event pattern, how to route events, eventbridge rule setup, create event rule, add target, test event pattern, send test event, event bus configuration, custom event source, function compute trigger, https endpoint event

---
Part of [EventBridge](https://company-skill.com/p/eb.md) · https://company-skill.com/llms.txt
