EventBridge rules, buses and Scheduler
Route a business event
An event reports something that happened. A command asks a recipient to do something. A shop publishes OrderPlaced without knowing which services will react. EventBridge can select recipients based on the content; it is not the worker that fulfills the order. The following fictional event and pattern belong to a Classic rule-based bus.
{ "source": "shop.orders", "detail-type": "OrderPlaced", "detail": { "orderId": "O-17", "schemaVersion": 1 }}{ "source": [ "shop.orders" ], "detail-type": [ "OrderPlaced" ], "detail": { "schemaVersion": [ 1 ] }}Buses, rules and targets
On the default or Custom Event Bus - Classic, producers send events to the bus, rules test patterns, and matching rules invoke configured targets such as SQS or a state machine. Our pattern matches O-17 because the source, detail-type and schemaVersion all agree. An OrderCancelled event or version 2 does not match. More than one rule can match; no match is not a processing error. AWS also documents a distinct Custom Event Bus with consumer-created subscribers and retained events. Do not mix its APIs, retry defaults or replay mechanism with Classic. Verify regional availability and permissions before choosing.
Scheduler, Pipes and partner events
Use Scheduler when time is the trigger: a daily report, a recurring rate, or a one-time reminder. For example rate(15 minutes) describes a recurring schedule, not an event pattern. Check time zone, flexible window, retry and deletion after completion for one-time jobs. Pipes connect a supported source to one target, with optional filtering and enrichment; a queue-to-workflow connection is a typical use. Partner event sources integrate supported SaaS providers; confirm provider setup, access and region first.
Design a stable event contract
Keep a business event ID, a schema version and only necessary data. Add optional fields without breaking older consumers; introduce an explicit new version for incompatible changes. A payment consumer must handle duplicate delivery using a durable operation key. Do not assume order across independent consumers. A bus policy, target permissions and any execution role serve distinct purposes. A successful publish does not prove that the target completed its business work.
Practice offline
In the lab, change schemaVersion to 2 and predict whether the sample rule matches. Then design two independent targets for version 1: inventory and audit. Explain why a daily cleanup should use Scheduler instead. Nothing is deployed; see the event-workflows fixture. Next: define the workflow that handles a selected event.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
EventBridge rules, buses and Scheduler — knowledge check
Apply the lesson to offline event and workflow scenarios.
A shop emits OrderPlaced. What should a Classic rule do?
The sample event has schemaVersion 2. What happens with the sample pattern?
A report should run once every day. Which feature fits?
A queue must feed one supported target with optional enrichment. Choose a feature.
A team selects the newer Custom Event Bus. Which design change matters?