4.1.3. Amazon EventBridge for Event-Driven Architectures
First Principle: Amazon EventBridge centralizes event routing from diverse sources, enabling developers to build event-driven architectures that react intelligently to changes and automate workflows.
EventBridge acts as a smart router for events ā it receives events from AWS services, your applications, and SaaS partners, then routes them to the right targets based on rules you define. It's a key component for building event-driven architectures.
- Central Event Bus: Collects events from various sources and routes them to targets.
- Event Sources:
- AWS Services: Over 200 AWS services automatically send events to EventBridge (e.g., EC2 instance state changes, DynamoDB updates, CloudTrail API calls).
- SaaS Partner Integrations: Direct integrations with popular SaaS applications (e.g., Zendesk, Salesforce).
- Custom Applications: You can publish your own custom events from your applications.
- Event Patterns: (JSON-based filters that define the specific attributes an event must possess to trigger a rule.) Allows you to define rules to match specific events.
- Targets: Route matched events to various destinations (e.g., AWS Lambda functions, Amazon SQS queues, Amazon SNS topics, AWS Step Functions) for processing or automation.
Scenario: You need to build an application that automatically reacts to various changes in your AWS environment (e.g., EC2 instance becoming stopped), and also processes custom events generated by your own application for auditing purposes.
ā ļø Exam Trap: EventBridge rules use event patterns (content-based filtering) ā not message attributes like SNS. If a question describes routing events based on content (e.g., order status = "shipped"), EventBridge is the answer.
