Lesson 15 of 30
SNS gives every subscriber the whole message. EventBridge asks a sharper question first: what's actually in this event, and who should even see it?
12 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
What's the core difference between how SNS and EventBridge decide who receives a given message?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
EventBridge is a central event bus: things publish events onto it, and rules decide who gets what based on the event's actual content, not a fixed subscriber list. A rule is an event pattern — a filter matched against the event's structure (its source, its type, fields inside its payload) — and only events matching that pattern get routed to that rule's targets.
This is the real difference from SNS. An SNS topic delivers the same message to every subscriber, full stop — filtering, if you want any, is a secondary bolt-on. EventBridge is built around the pattern match as the primary mechanism: one bus can carry many different kinds of events from many different sources, and each rule picks out only the slice it cares about. That makes EventBridge the better fit once "who should react to this" isn't just "everyone," but genuinely depends on what the event says.
{
"source": "app.orders",
"detail-type": "OrderStatusChanged",
"detail": { "orderId": "o-482", "status": "refunded", "amount": 199 }
}
One event lands on the bus: OrderStatusChanged, status=refunded, amount=199.
That single event lands on the bus once. One rule matches detail-type: "OrderStatusChanged" with detail.status: "refunded" and routes to a Lambda that triggers customer notifications. A second, independent rule matches any event where detail.amount exceeds a threshold and routes to a fraud-review queue — the same event, sliced two different ways, with neither rule aware the other exists. Adding a third reaction later means writing a third rule, not modifying the publisher or the other two rules at all.
status: "refunded"), not only on "this came from the orders service" — that's what makes content-based routing possible instead of every subscriber getting everything and filtering client-side."How would you route different downstream reactions off a single event without a growing pile of if/else in the publisher?" tests whether a candidate reaches for content-based routing (EventBridge rules matching on payload fields) instead of hardcoding every consumer's logic into whatever publishes the event.