Ref: https://learn.cantrill.io/courses/1820301/lectures/41301394
Amazon EventBridge - Overview and Architecture
Diagram: https://github.com/acantril/aws-sa-associate-saac03/blob/main/1600-SERVERLESS_and_APPLICATION_SERVICES/00_LEARNINGAIDS/EventBridge-1.png
- š§Ā Manage system events in your AWS account
- Events describe changes in AWS products & services (e.g. EC2 instance terminated)
- Provides:
- Event visibility (near-real-time stream of events = Event Bus)
- Event delivery to targets/destination
- Can support event-driven architectures (EDAs) in AWS
- Event Bus: contains a stream of events ā monitored by EventBridge
- Default Event Bus: present in any AWS account, contains all system events in account
- Implicit, not really exposed in the UI
- EventBridge can configure additional event buses ā manage events from outside the account, from external services, etc.
- Basic job/architecture: āIf X happens, or at Y time(s)⦠send info to Zā
X
= generated event from a supported AWS service (event producer)
Y
= certain time/time periods, traditionally specified using Unix CRON format (scheduled events)
- š”Ā EventBridge Scheduler has a more modern UI that can allow you to set a schedule in a friendlier manner
Z
= supported target AWS service to deliver the event to (event consumer)
- Rules match incoming events (or schedules) ā Event Pattern Rule OR Schedule Rule
- When event/schedule matches, events are routed to 1+ targets (e.g. Lambda)
- Events delivered as JSON structures ā their data can be used by the targets
- e.g. if EC2 instance changes state, its event contains instance ID, newState, timestampā¦
CloudWatch Events
- š§Ā Amazon EventBridge has a superset of the functionality of CWEvents
- š”Ā CWEvents was historically the place for event management⦠but it has been phased out by EventBridge, which contains more functionality ā going to CWEvents now just redirects to EventBridge
- EventBridge and CWEvents use the same underlying APIs and basic architecture
- āĀ While it was still accessible, CWEvents could ONLY monitor the default event bus in the account
- EventBridge can also handle events from 3rd-parties as well as custom apps, by configuring additional event buses