EventBridge — Concept
What it is
Amazon EventBridge = serverless event bus that routes events from AWS services, SaaS partners, or your own apps to many possible targets, with rich filtering, schema management, and scheduling.
Why it exists
SNS does pub/sub well but with limited filtering and only on message attributes. EventBridge adds:
- Rich JSON pattern matching on whole event payload.
- Multiple event buses (default, custom, partner).
- Cross-account / cross-region routing.
- Archive + replay of events.
- Schema registry / Schema discovery.
- Scheduler (cron-like).
- Native integrations with 150+ services.
Core concepts
- Event bus — where events arrive. Default bus per account/region; custom buses for your own events; partner buses for SaaS (Zendesk, Datadog, etc.).
- Event — JSON with
source,detail-type,detail. - Rule — pattern + target(s). Match an event → invoke target(s).
- Target — Lambda, SQS, SNS, Step Functions, ECS task, Kinesis, API Gateway, another bus, …
- Schema registry — discovers and stores event schemas; auto-generates code bindings.
EventBridge Scheduler
- Cron-like (rate / cron / at) at scale, with target invocation across 270+ APIs.
- Time zones, flexible windows, retries, DLQ.
- Replaces the old "Scheduled rules" for new use cases.
EventBridge Pipes
- Connect a source → optional filter → optional enrichment → target without writing Lambda glue.
- Sources: SQS, Kinesis, DynamoDB Streams, MQ, etc.
- Use for low-code integrations.
Filter pattern (example)
{
"source": ["aws.ec2"],
"detail-type": ["EC2 Instance State-change Notification"],
"detail": { "state": ["stopped"] }
}
When to use vs alternatives
| Use ... | Instead of ... | When ... |
|---|---|---|
| EventBridge | SNS | Need rich filtering, cross-account, archive/replay, many AWS targets |
| SNS | EventBridge | Mobile push, SMS, simple high-throughput fanout |
| EventBridge Scheduler | EventBridge rule with cron | Modern scheduling with broader target set, flexible windows |
| Step Functions | EventBridge | Orchestrate multi-step workflows with state |
| Pipes | Lambda glue | Move data SQS→Step Functions etc. with filter+enrich |
Common exam scenarios
- "React to EC2 state changes account-wide" → EventBridge rule on
aws.ec2events → Lambda / SNS. - "Centralize events from many accounts to a security account" → cross-account event bus.
- "Replay last week's events for testing" → Archive + Replay.
- "Trigger Lambda every 5 minutes" → EventBridge Scheduler (or rule).
- "Datadog or Zendesk events trigger workflows in AWS" → partner event bus.
- "Move SQS messages to Step Functions with filter" → EventBridge Pipes.
Exam tip
- Routing & filtering & cross-service → EventBridge.
- Pub/sub to mobile / SMS / many SQS → SNS.
- State machine orchestration → Step Functions.