# eb-event-delivery

Part of **EB**

# EventBridge Event Delivery Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|----------|---------------|---------------|-------------|
| Publish Event | Console > EventBridge > Events > Publish Event | EventBridge instance created, user permissions granted | Publish a test event to an event bus via the console |
| Create Message Outflow Task | Console > EventBridge > Message Outflow > Create Message Outflow Task | Active EventBridge instance, sink endpoint configured | Create a task to deliver filtered events to external systems |
| Manage API Destinations | Console > Integration > API Destinations | EventBridge activated and permissions granted | Create connections and API destinations for third-party integrations |
| Receive Message | Console > MNS > Queue list | Message queue created, event sent to queue | Verify event delivery by receiving messages from an MNS queue |

## Operation Steps

### Publish Event

**Navigation**: Console > EventBridge > Events > Publish Event

**Prerequisites**:
- An EventBridge instance must be created
- The user must have the necessary permissions

1. Click on the **Publish Event** (button) in the top-right corner
   - Notes: Opens the event publishing form

2. Select the target event bus from the **Event Bus Name** (dropdown) in the main content area
   - Notes: Default event bus is pre-selected; ensure correct bus is chosen

3. Enter a source name in the **Source** (text_input) field
   - Notes: Use a unique identifier for your application or service (e.g., "my-app")

4. Enter a detail type in the **Detail Type** (text_input) field
   - Notes: Categorizes the event (e.g., "user.action", "system.alert")

5. Paste the event payload as a valid JSON string in the **Detail** (text_input) field
   - Notes: Must be valid JSON; use preview to validate structure

6. Click the **Publish** (button) at the bottom of the form
   - Notes: Event is delivered immediately to the selected event bus

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Source | text_input | Yes | — | A unique identifier for the event source (e.g., app or service name) |
| Detail Type | text_input | Yes | — | Category or type of the event (e.g., user.action) |
| Detail | text_input | Yes | — | Event data in valid JSON string format |
| Event Bus Name | dropdown | Yes | default, custom-bus-1, custom-bus-2 | The event bus to receive this event |

### Create Message Outflow Task

**Navigation**: Console > EventBridge > Message Outflow > Create Message Outflow Task

**Prerequisites**:
- An active EventBridge instance
- Permissions to create and manage sinks
- Target service endpoint configured and accessible

1. Click on **Create Message Outflow Task** (button) in the top-right corner of the Message Outflow page
   - Notes: Opens the task creation panel

2. Select a sink from the **Sink** (dropdown) in the main content area
   - Notes: Available options include HTTP Endpoint, Kafka Cluster, SLS Logstore, Function Compute

3. Enter an event filtering pattern in the **Event Pattern** (text_input) field
   - Notes: Use JSON format to define which events are delivered (default: `{}` for all)

4. Configure retry settings using the **Retry Policy** (number_input) field
   - Notes: Default is 3 retries with exponential backoff; adjust based on reliability needs

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Sink | dropdown | Yes | HTTP Endpoint, Kafka Cluster, SLS Logstore, Function Compute | Destination service for event delivery |
| Event Pattern | text_input | No | — | JSON-formatted filter to select events (default: `{}`) |
| Retry Policy | number_input | No | — | Number of delivery retry attempts (default: 3) |

### Manage API Destinations

**Navigation**: Console > Integration > API Destinations

**Prerequisites**:
- Activate EventBridge and grant permissions

1. Log on to the **EventBridge console** (link) via the top navigation bar

2. Choose **Integration > API Destinations** (menu) from the left-side navigation pane

3. Select a region and click the **Connection Configuration** (tab) in the top navigation bar

4. Click **Create Connection** (button) in the main content area

5. In the **Connection Configuration panel** (text_input), set:
   - **Name** (text_input): connection name
   - **Description** (text_input): optional description
   - **Authentication Method** (dropdown): Basic, OAuth, or API Key
   - **Network** (dropdown): Internet or Private Network
   - Conditional fields appear based on authentication method (e.g., Username/Password for Basic)
   - Element: **Connection Configuration panel** (text_input)

6. Click **OK** (button) at the bottom of the form to save the connection

7. Switch to the **API Destinations** (tab) in the top navigation bar

8. Click **Create API Destination** (button)

9. In the **Basic Information section** (text_input), enter name and description

10. In the **API Configuration section** (text_input), set the target API endpoint URL and HTTP method

11. In the **Connection Configuration section** (dropdown), select an existing connection or create a new one

12. Click **OK** (button) to create the API destination

13. To use it in an event rule, go to **Event Rules** (menu) in the left navigation panel

14. On the Targets tab, set **Service Type** (dropdown) to "API Destination"

15. Select your API destination from the **Existing API Destination** (dropdown)

16. Click **Create Rule** (button) in the top-right corner to finalize

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Name | text_input | Yes | — | Name of the connection |
| Description | text_input | No | — | Optional description |
| Authentication Method | dropdown | Yes | Basic, OAuth, API Key | Method used to authenticate with the target API |
| Username | text_input | Conditional | — | Required only for Basic auth |
| Password | text_input | Conditional | — | Required only for Basic auth |
| Authorization Server Endpoint | text_input | Conditional | — | Required only for OAuth |
| HTTP Method | dropdown | Conditional | GET, POST | Used for OAuth token request |
| Client ID | text_input | Conditional | — | Required for OAuth |
| Client Secret | text_input | Conditional | — | Required for OAuth |
| Additional Parameters | text_input | Conditional | — | Extra headers/body/query for OAuth |
| ApiKeyName | text_input | Conditional | — | Required for API Key auth |
| ApiKeyValue | text_input | Conditional | — | Required for API Key auth |
| Network | dropdown | Yes | Internet, Private Network | Network type for connectivity |
| API Endpoint URL | text_input | Yes | — | Full URL of the target API |
| HTTP Method (API) | dropdown | Yes | GET, POST, PUT, DELETE, etc. | HTTP method for event delivery |

### Receive Message

**Navigation**: Console > MNS > Queue list

**Prerequisites**:
- A message queue has been created
- An event has been sent to the queue

1. Navigate to the **Queue list** page in the MNS console

2. Find the target queue and click **Send/receive msgs** (link) in the Actions column
   - Element: **Send/receive msgs** (link)
   - Location: Actions column

3. On the *Quick experience of sending and receiving messages for queue* page, click **Receive message** (button) in the Receive message section
   - Element: **Receive message** (button)
   - Location: Receive message section
   - Notes: A sample received message will be displayed below if delivery was successful

## FAQ

Q: Where can I publish a test event without writing code?
A: Use the **Publish Event** button in the EventBridge console under Events > Publish Event. Fill in Source, Detail Type, and Detail fields to send a test event.

Q: What authentication methods are supported for API destinations?
A: EventBridge supports Basic, OAuth, and API Key authentication for API destinations. The required fields change dynamically based on your selection.

Q: Can I filter which events are sent to a sink in message outflow?
A: Yes. Use the **Event Pattern** field in JSON format to define filtering rules (e.g., `{"source": ["my-app"]}`). If left empty (`{}`), all events are delivered.

Q: How do I verify that my event was delivered to MNS?
A: Go to the MNS console, find your queue, click **Send/receive msgs**, then click **Receive message** to view delivered messages.

Q: Do I need to create a connection before creating an API destination?
A: Yes. API destinations require a pre-configured connection that defines authentication and network settings. You can create one during API destination setup or beforehand.

## Pricing & Billing

### Billing Model
Billing is based on per-request usage across all operations (event publishing, message outflow, API destination calls, and message reception).

### Price Reference
| Tier | Input Price | Output Price |
|------|-------------|--------------|
| standard/default | ¥0.0001 per request | ¥0.0001 per request |
| MNS receive | — | ¥0.001 per request |

### Free Tier
- Event publishing, message outflow, and API destinations: 10,000 free requests per month
- MNS message receive: 1,000 free requests per month
- Free tier resets monthly on the 1st

### Billing Notes
- Events are billed per publish or delivery attempt; failed attempts are not charged for message outflow and API destinations
- MNS charges per receive operation (each click of "Receive message" counts as one request)
- Quota limits apply: 100 QPS per account for event publishing; 100 messages/second per MNS queue; 1,000 events/second per message outflow task
- Data size limit: API destination calls support up to 8KB per request