You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Amazon EventBridge is a serverless event bus that connects applications using events. While SNS provides pub/sub messaging and SQS provides point-to-point queuing, EventBridge adds intelligent event routing with content-based rules, schema discovery, and native integration with over 200 AWS services and third-party SaaS applications.
EventBridge is an event bus — a central hub that receives events from many sources and routes them to targets based on rules you define. Think of it as a smart switchboard that examines each incoming event and decides where to send it.
[Source A] ——> ——> [Target 1: Lambda]
[Source B] ——> [EventBridge Event Bus] ——> [Target 2: SQS]
[Source C] ——> ——> [Target 3: Step Functions]
| Feature | SNS | EventBridge |
|---|---|---|
| Routing | Filter policies on subscriptions | Content-based rules on event body |
| Event sources | Your applications | AWS services, SaaS apps, your applications |
| Schema | No schema enforcement | Schema registry and discovery |
| Targets | SQS, Lambda, HTTP, Email, SMS | 20+ target types including Step Functions, API Gateway, other buses |
| Throughput | Nearly unlimited | Region-dependent (soft limit, can be increased) |
| Archive and replay | Not supported | Built-in event archive and replay |
| Cross-account | Via topic policies | Via cross-account event buses |
| Best for | Simple pub/sub, high throughput | Complex routing, AWS service events, SaaS integration |
Rule of thumb: Use SNS for simple, high-throughput fan-out. Use EventBridge for complex event routing, when you need to react to AWS service events, or when you need schema management.
An event bus receives events. Every AWS account has a default event bus that automatically receives events from AWS services. You can also create custom event buses for your own applications.
| Bus Type | Source | Use Case |
|---|---|---|
| Default | AWS services | React to EC2 state changes, S3 events, etc. |
| Custom | Your applications | Domain events for your microservices |
| Partner | SaaS applications | Events from Zendesk, Datadog, Auth0, etc. |
An EventBridge event is a JSON object with a specific structure:
{
"version": "0",
"id": "abc123-def456",
"source": "order-service",
"detail-type": "OrderPlaced",
"time": "2025-03-15T10:30:00Z",
"region": "eu-west-2",
"account": "123456789012",
"detail": {
"orderId": "ORD-12345",
"customerId": "CUST-789",
"total": 149.99,
"items": ["SKU-001", "SKU-042"]
}
}
Key fields:
| Field | Description |
|---|---|
| source | Identifies who produced the event |
| detail-type | The type of event (like an event name) |
| detail | The event payload — your custom data |
| time | When the event occurred |
Rules match incoming events and route them to targets. A rule consists of:
A target is a resource that receives the event. EventBridge supports over 20 target types:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.