Amazon EventBridge
Key concepts
Event buses
Event rules and patterns
Schema registry
Cross-account events
Archive and replay
Overview
Amazon EventBridge is a serverless event bus service that enables you to build event-driven architectures by routing events from AWS services, custom applications, and SaaS partners to target services. EventBridge provides powerful event pattern matching, cross-account delivery, and schema discovery capabilities.
Understanding EventBridge is important for the SAA-C03 exam because it's the modern approach to event-driven architectures in AWS, replacing CloudWatch Events with enhanced capabilities. You must know when to use EventBridge vs SNS vs SQS, how to configure event rules and patterns, and how to design cross-account event architectures.
Event-Driven Architecture Hub
EventBridge is the recommended service for building event-driven architectures when you need complex event pattern matching, SaaS partner integration, scheduled events (cron), or cross-account event sharing.
Focus on event buses (default, custom, partner), event rules with pattern matching, cross-account event delivery, archive and replay for debugging, and comparing EventBridge vs SNS vs SQS use cases.
Key Concepts
EventBridge Architecture

Event Bus
An event bus receives events from various sources. There are three types:
- Default event bus: Automatically receives events from AWS services
- Custom event bus: Receives events from your applications
- Partner event bus: Receives events from SaaS partners (Zendesk, Datadog, Auth0, etc.)
Rules and Targets
Rules define which events to match using event patterns or schedules. Each rule can have up to 5 targets. Targets are AWS services that receive matched events: Lambda, SQS, SNS, Step Functions, Kinesis, API Gateway, and more.
Event Structure
{
"version": "0",
"id": "12345678-1234-1234-1234-123456789012",
"detail-type": "EC2 Instance State-change Notification",
"source": "aws.ec2",
"account": "123456789012",
"time": "2025-01-18T12:00:00Z",
"region": "us-east-1",
"resources": [
"arn:aws:ec2:us-east-1:123456789012:instance/i-1234567890abcdef0"
],
"detail": {
"instance-id": "i-1234567890abcdef0",
"state": "stopped"
}
}Event Patterns
Event Pattern Matching
Event patterns define which events a rule matches. Patterns match event fields using exact match, prefix match, numeric comparisons, IP address matching, and exists/not exists checks. Only matched events are delivered to targets.
// Match EC2 instance state changes to "stopped" or "terminated"
{
"source": ["aws.ec2"],
"detail-type": ["EC2 Instance State-change Notification"],
"detail": {
"state": ["stopped", "terminated"]
}
}
// Match events from specific account with prefix
{
"source": [{"prefix": "myapp."}],
"account": ["123456789012"]
}
// Match numeric range (order value > 1000)
{
"source": ["myapp.orders"],
"detail": {
"value": [{"numeric": [">", 1000]}]
}
}
// Match when field exists
{
"detail": {
"error-code": [{"exists": true}]
}
}Rule Types
EventBridge Rule Types
| Rule Type | Trigger | Use Case |
|---|---|---|
| Event Pattern | Matches incoming events | React to AWS/app events |
| Schedule (rate) | Fixed interval (rate(5 minutes)) | Periodic tasks |
| Schedule (cron) | Cron expression | Specific times (daily reports) |
Rate Expressions:
├── rate(1 minute) - Every minute
├── rate(5 minutes) - Every 5 minutes
├── rate(1 hour) - Every hour
└── rate(1 day) - Every day
Cron Expressions: cron(minutes hours day-of-month month day-of-week year)
├── cron(0 12 * * ? *) - 12:00 PM UTC daily
├── cron(0 8 ? * MON-FRI *) - 8:00 AM weekdays
├── cron(0/15 * * * ? *) - Every 15 minutes
└── cron(0 18 ? * MON *) - 6:00 PM every MondayEventBridge Services
Schema Registry

Schema Registry
Schema Registry automatically discovers and stores event schemas from your event buses. Schemas describe the structure of events, enabling IDE code completion and validation. EventBridge can generate code bindings for Java, Python, and TypeScript.
Schema Registry Features:
├── Auto-Discovery
│ ├── Discovers schemas from events on the bus
│ └── Creates versioned schema definitions
│
├── Code Bindings
│ ├── Generate typed classes (Java, Python, TypeScript)
│ ├── Download from console or CLI
│ └── Use with AWS Toolkit for IDEs
│
└── Cross-Account Discovery
├── Share schemas across accounts
└── Centralize event documentationArchive and Replay
Event Archive and Replay
Archives store events for a configurable retention period. Replay allows you to resend archived events to an event bus for debugging, testing, or recovery. Events are not guaranteed to replay in original order.
Archive and Replay
| Feature | Description | Use Case |
|---|---|---|
| Archive | Store events with retention period | Compliance, debugging |
| Replay | Resend archived events to bus | Test fixes, recover from errors |
| Partial Replay | Replay events from time range | Targeted debugging |
1. Create Archive
└── Specify event bus and retention period
└── Optional: Filter events with pattern
2. Events Flow
└── Events matching pattern are archived
└── Stored for retention period (days)
3. Replay Events
├── Specify archive and time range
├── Select rules to replay to (or all)
└── Events re-delivered to targets
Important Notes:
├── Events NOT replayed in original order
├── Add timestamps to events for ordering
├── Replay generates new event IDs
└── Targets must be idempotentEventBridge Pipes
EventBridge Pipes
Pipes provide point-to-point integrations between event sources and targets with optional filtering, enrichment, and transformation. Pipes connect directly without using an event bus, simplifying 1:1 integrations.
Source → Filter → Enrichment → Target
Sources:
├── DynamoDB Streams
├── Kinesis Data Streams
├── Amazon MQ
├── Amazon MSK
├── Self-managed Apache Kafka
└── Amazon SQS
Optional Steps:
├── Filter: Match event patterns
├── Enrich: Call Lambda/Step Functions/API Gateway
└── Transform: Reshape event before delivery
Targets:
├── Lambda, Step Functions
├── SQS, SNS, Kinesis
├── EventBridge bus
├── API Gateway, API destinations
└── Many more AWS servicesEventBridge Scheduler
EventBridge Scheduler
Scheduler is a serverless scheduler for creating, executing, and managing scheduled tasks at scale. Unlike EventBridge rules with schedules, Scheduler supports one-time schedules and can invoke targets in other accounts.
Scheduler vs Rule Schedules
| Feature | EventBridge Rules | EventBridge Scheduler |
|---|---|---|
| One-time schedules | No | Yes |
| Recurring schedules | Yes | Yes |
| Scale | ~300 rules per bus | Millions of schedules |
| Cross-account targets | No | Yes |
| Time zones | UTC only | All time zones |
API Destinations
API Destinations
API destinations allow EventBridge to send events to HTTP endpoints outside AWS. Configure authentication (Basic, OAuth, API Key), rate limiting, and input transformation to integrate with external APIs and SaaS applications.
API Destination Components:
├── Connection
│ ├── Authorization: Basic, OAuth, API Key
│ └── Shared across destinations
│
├── API Destination
│ ├── HTTP endpoint URL
│ ├── HTTP method (POST, PUT, etc.)
│ └── Invocation rate limit (per second)
│
└── Rule/Pipe Target
├── Input transformation
└── Dead-letter queue for failures
Timeouts and Limits:
├── Request timeout: 5 seconds max
├── Retry: Up to 24 hours, 185 attempts
└── Rate limiting: 300 invocations/second maxCross-Account Events

Cross-Account Event Delivery
EventBridge supports sending events across accounts using resource-based policies. The receiving account must grant permission to the sending account. Common pattern: centralize events from multiple accounts into a single monitoring account.
// Resource policy on receiving account's event bus
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowAccountToPutEvents",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::111122223333:root"
},
"Action": "events:PutEvents",
"Resource": "arn:aws:events:us-east-1:444455556666:event-bus/central-bus"
}
]
}Account A (Production) Account B (Monitoring)
┌─────────────────────┐ ┌──────────────────────┐
│ Default Event Bus │ │ Central Event Bus │
│ │ │ │ │ │
│ [Rule: Forward] │──────────────│► [Rule: Alert] │
│ │ │ PutEvents │ │ │
│ (all events) │ │ [SNS Topic] │
└─────────────────────┘ └──────────────────────┘
Account C (Development)
┌─────────────────────┐
│ Default Event Bus │
│ │ │
│ [Rule: Forward] │──────────────────────────┘
└─────────────────────┘EventBridge vs SNS vs SQS
When to Use Each Service
| Requirement | Best Service | Why |
|---|---|---|
| Point-to-point queuing | SQS | Buffering, decoupling |
| Fan-out to multiple subscribers | SNS | Push-based pub/sub |
| Complex event pattern matching | EventBridge | Rich filtering syntax |
| SaaS partner integration | EventBridge | Built-in partner buses |
| Scheduled/cron jobs | EventBridge | Native scheduling support |
| SMS/Email/Push notifications | SNS | Direct notification protocols |
| Message retention/replay | EventBridge (archive) | Built-in archive and replay |
| Cross-account events | EventBridge | Resource-based policies |
Do you need to integrate with SaaS partners?
├── Yes → EventBridge (partner event sources)
└── No ↓
Do you need complex event pattern matching?
├── Yes → EventBridge (content-based filtering)
└── No ↓
Do you need scheduled/cron jobs?
├── Yes → EventBridge (Scheduler or rule schedules)
└── No ↓
Do you need SMS/Email/Push notifications?
├── Yes → SNS (notification protocols)
└── No ↓
Do you need fan-out to multiple consumers?
├── Yes → SNS (or EventBridge with multiple targets)
└── No ↓
Do you need message buffering/persistence?
├── Yes → SQS (message retention up to 14 days)
└── No → Consider EventBridge for AWS service eventsInput Transformation
Input Transformation
Input transformers customize the event payload before delivery to targets. Use input paths to extract values from the event, then use an input template to construct the transformed payload.
// Original Event
{
"detail-type": "EC2 Instance State-change Notification",
"source": "aws.ec2",
"detail": {
"instance-id": "i-1234567890abcdef0",
"state": "stopped"
}
}
// Input Path (extract values)
{
"instance": "$.detail.instance-id",
"status": "$.detail.state"
}
// Input Template (construct payload)
{
"message": "Instance <instance> is now <status>",
"timestamp": "<aws.events.event.ingestion-time>"
}
// Result sent to target
{
"message": "Instance i-1234567890abcdef0 is now stopped",
"timestamp": "2025-01-18T12:00:00.000Z"
}Best Practices
Architecture Best Practices
1. Use Custom Event Buses for Application Events
├── Separate from AWS service events
├── Easier access control
└── Cleaner event organization
2. Implement Dead-Letter Queues
├── Capture failed deliveries
├── SQS queue as DLQ
└── Monitor and alert on DLQ messages
3. Use Schema Registry
├── Document event structures
├── Generate typed code
└── Version schemas for compatibility
4. Archive Events for Compliance
├── Configure retention period
├── Use event patterns to filter
└── Enable replay for debugging
5. Design Idempotent Targets
├── Events may be delivered multiple times
├── Replay doesn't guarantee order
└── Use event IDs for deduplicationSecurity Best Practices
Security Considerations
Use resource-based policies to control which accounts can put events to your bus.
Encrypt sensitive data in event payloads using client-side encryption.
Use VPC endpoints for EventBridge in private subnets.
Implement least privilege for rules and targets using IAM roles.
Common Exam Scenarios
Exam Scenarios
| Scenario | Solution | Why |
|---|---|---|
| React to EC2 state changes | EventBridge rule on default bus | AWS events go to default bus |
| Trigger Lambda on schedule | EventBridge rule with cron expression | Native scheduling support |
| Integrate with Zendesk events | EventBridge partner event source | Built-in SaaS integration |
| Centralize events from multiple accounts | Cross-account EventBridge | Resource-based policies |
| Debug event processing issues | Archive and replay events | Replay to test fixes |
| Send events to external API | API destinations | HTTP endpoint integration |
| Match events by content | Event pattern with detail filters | Content-based filtering |
| Point-to-point DynamoDB to Lambda | EventBridge Pipes | Direct integration without bus |
Common Pitfalls
Pitfall 1: Not Using Dead-Letter Queues
Mistake: Not configuring DLQs for rule targets.
Why it fails: Failed deliveries are lost; no visibility into failures.
Correct Approach: Configure SQS DLQ for each rule; monitor DLQ depth.
Pitfall 2: Assuming Event Order in Replay
Mistake: Assuming replayed events arrive in original order.
Why it fails: Archive replay does not guarantee ordering.
Correct Approach: Include timestamps in events; design targets to handle out-of-order.
Pitfall 3: Using Default Bus for Application Events
Mistake: Sending custom application events to the default bus.
Why it fails: Mixed with AWS service events; harder to manage access control.
Correct Approach: Create custom event buses for application events.
Pitfall 4: Not Handling API Destination Timeouts
Mistake: Not accounting for the 5-second timeout limit.
Why it fails: Slow external APIs cause delivery failures.
Correct Approach: Ensure endpoints respond quickly; use DLQ for retries.
Pitfall 5: Overly Broad Event Patterns
Mistake: Creating rules that match too many events.
Why it fails: Increased costs and target invocations.
Correct Approach: Use specific patterns; filter in rule, not in target.
Related Services
Quick Reference
EventBridge Limits
Key EventBridge Limits
| Resource | Default Limit |
|---|---|
| Rules per event bus | 300 |
| Targets per rule | 5 |
| Event buses per account | 100 |
| Event size | 256 KB |
| PutEvents batch size | 10 events |
| Invocations per second (API dest) | 300 |
Pricing Summary
Events:
├── Custom events: $1.00 per million
├── AWS service events: Free
├── Cross-account: $1.00 per million
└── Partner events: $0.05 per million
Scheduler:
├── Standard schedules: $1.00 per million invocations
└── One-time schedules: Free
Archive & Replay:
├── Archive storage: $0.023 per GB-month
├── Archive processing: $0.10 per GB
└── Replay: $1.00 per million events
API Destinations:
└── Invocations: $0.20 per millionCommon CLI Commands
# Create custom event bus
aws events create-event-bus --name my-app-bus
# Create rule with event pattern
aws events put-rule \
--name "ec2-stopped-rule" \
--event-bus-name "default" \
--event-pattern '{"source":["aws.ec2"],"detail-type":["EC2 Instance State-change Notification"],"detail":{"state":["stopped"]}}'
# Create scheduled rule (every 5 minutes)
aws events put-rule \
--name "every-5-min" \
--schedule-expression "rate(5 minutes)"
# Add Lambda target to rule
aws events put-targets \
--rule "ec2-stopped-rule" \
--targets "Id"="1","Arn"="arn:aws:lambda:us-east-1:123456789012:function:MyFunction"
# Put custom event
aws events put-events \
--entries '[{"Source":"myapp","DetailType":"OrderCreated","Detail":"{\"orderId\":\"12345\"}","EventBusName":"my-app-bus"}]'
# Create archive
aws events create-archive \
--archive-name "my-archive" \
--event-source-arn "arn:aws:events:us-east-1:123456789012:event-bus/default" \
--retention-days 30Test Your Knowledge
A company wants to trigger a Lambda function every weekday at 8:00 AM UTC. Which EventBridge configuration should they use?
A solutions architect needs to receive events from Zendesk into AWS for processing. What is the MOST efficient approach?
An application needs to send events to an external REST API. The API sometimes takes 10 seconds to respond. What should the architect consider?
A company wants to centralize events from production, staging, and development accounts into a single monitoring account. What is the recommended approach?