When you need to store, query, or analyze event data from EventBridge, you can route events to a Simple Log Service (SLS) Logstore by configuring SLS as the sink of an event stream.
Prerequisites
Before you begin, ensure that you have:
Create an event stream with an SLS sink
Log on to the EventBridge console and click Event Streams in the left-side navigation pane.
Select a region in the top navigation bar and click Create Event Stream.
Specify the Task Name and Description, then configure the event stream:
In the Source, Filtering, and Transformation steps, specify the event source, filtering rules, and transformation rules, then click Next Step. For more information about event transformation, see Use Function Compute to perform message cleansing.
In the Sink step, set Service Type to Simple Log Service and configure the following parameters:
Parameter
Description
Example
Project
The SLS project to receive events.
test-project
Logstore
The Logstore within the project.
test-logstore
Topic
A topic name to categorize the routed logs.
test-topic
Content
The event content to route to SLS. For details, see Event transformation.
Complete Event
Role
The RAM role that authorizes EventBridge to read logs in SLS. For the required permission policy, see Route events to Log Service.
testRole
Configure the retry policy and dead-letter queue. These settings determine how EventBridge handles delivery failures. For details, see Retry policies and dead-letter queues.
Click Save.
On the Event Streams page, find your event stream and click Enable in the Actions column.
Enabling takes 30 to 60 seconds. Track the progress in the Status column.
Verify event delivery
After you enable the event stream, confirm that events arrive in SLS:
Log on to the Simple Log Service console.
In the Projects section, click your project.
On the Logstores page, click your Logstore.
Click Search & Analyze to query the routed events.
