AWSDOP-C02
On this page
Beginner-friendly overview

EventBridge

EventBridge is a serverless event bus that routes events between AWS services, your own applications, and SaaS partners. Think of it as a smart traffic router: events flow in from many sources, you write rules that match specific events, and EventBridge delivers matching events to the right destinations.

Events as a Language

Modern architectures are increasingly event-driven: something happens (a new order, a file uploaded, a user signed up, an EC2 instance changed state), and that event triggers one or more downstream actions. The challenge is wiring these together without creating tight coupling between services.

EventBridge solves this with a publish-subscribe model where producers and consumers are completely independent. The producer emits an event; it doesn't know or care what happens next. The consumers receive events that match their rules; they don't know or care who sent them.

Sources publish once โ€” rules read the content and decide who hears about it EC2 (AWS service) instance i-0abc stopped Your app (PutEvents) order total: $1,450 Event Bus Rule A (pattern match) source = aws.ec2 state = stopped Rule B (pattern match) detail.total > 1000 (numeric filter) Lambda auto-remediate SNS notify ops Step Functions fraud review workflow One rule can fan out to up to 5 targets in parallel โ€” and producers never know who is listening.

The Default Event Bus

Every AWS account has a default event bus that automatically receives events from AWS services โ€” EC2 instance state changes, S3 bucket notifications, RDS snapshots completing, CodePipeline stage transitions, and hundreds more. You write rules against this bus to react to AWS events without any additional configuration in those services.

Rules and Targets

A rule specifies which events to match, using an event pattern (a JSON filter that checks the event's fields and values). A matching event can be sent to up to five targets simultaneously โ€” Lambda functions, SQS queues, SNS topics, Step Functions state machines, ECS tasks, API destinations, and more.

Custom Event Buses and SaaS Integration

You can create your own event buses for your application's events and send events from your code using PutEvents. EventBridge also integrates with SaaS providers like Shopify, Datadog, and Zendesk, so events from those services appear on your bus without any custom polling or webhook management.

EventBridge vs SNS vs SQS

These three services are often confused. The simplest distinction: use SNS when you want to fan out a notification to many subscribers, use SQS when you want to queue work for a single consumer, and use EventBridge when you want content-based routing โ€” sending different events to different targets based on what the event actually contains.

SNS shouts, SQS queues, EventBridge sorts. SNS = megaphone (push the same message to every subscriber). SQS = waiting line (hold messages until a consumer pulls them). EventBridge = mail-sorting office (open each envelope, read the contents, route by rule). If the question hinges on routing by event content, the answer is EventBridge.