Event Bridge

David Kim·2025년 3월 18일

RE)인프라 구성

목록 보기
7/7

Amazon EventBridge is a serverless event bus that makes it easier to build event-driven applications at scale using your applications intergrated with SaaS partners and AWS Services, Including AWS Lambda and Amazon simple notification service and Other SaaS applications

EventBridge was previously "Cloud watch Events". So it uses the Cloud watch Events API

EventBus is pipeline that receives events

What Does Amazon EventBridge Do?

Event procedure send Event to EventBridge to be delivered to other event cousumer

Using EventBridge, you decouple Event procedure from event consumers So each component of the system can independantly scale while events are filterd and routed

EventBridge makes it easier to integrate services with out needing custom integration logic to connect each individual services

Let's explore Key components

Events

Event is an indicator of change in an environment

Event Bus

Event Bus is a broker that receives and distributes events

There are following three types of event buses

  1. Default event bus: every AWS account has a default event bus, which receives events from AWS services in that account
  2. Custom event buses: Custom event buses are used to receive events from custom applications, different AWS account in same region or from different Region
  3. Partner event buses: Receive events from a SaaS Partner a through event source

Rules

Rules evaluates events and send them to consumers or targets.
Rules are assigned to a single eventbus and are invoked in one of two ways. First, when an event on an event bus matches a rule's event pattern. Second, If you have defined a schedule and EventBridge invokes based on identified times

Target

target is a resource where EventBridge sends events when a rule's event pattern matches. you can associates multiple targets for a rule to send a same event to multiple other consumers without createing multiple rules

EventBridge Usecases

Event-driven architecture

Event-driven architecture uses events to communicate decoupled producers and consumers and are common in modern applications built with micro services

SaaS integration

To unlock the siloed data, Customers are building Event-driven architecture that ingest SaaS application events or send their events SaaS applications using EventBridge

Infrastructure automation

EventBridge Rule

How rules work

Rules receive incoming events and as events match a rule, the rule routes the events to targets to be processed. All sending the events to targets for parallel processing. Events can be customized by the rules prior to sending to the targets by transforming content into particular format for the target to use more effectively

Event format

Events are represented as json object and they all have a similar structure and the same top-level fields

the event structure consists of top-level fields such as
version, source,id,detail-type,account,time,region,resources,and detail

For EventBridge to receive an event, whether from AWS service or custom event, It must contain minimum details of source, detail-type, detail

Event Pattern

Event pattern is json object with the same structure of the event that it is matching

Rule matching

for the event pattern to match an event, the event must contain all fields name listed in the event pattern. any additional fields in the event that aren't included in the event pattern are ignored

Scheduled rule

you can also define certain time intervals when rule is run
EventBridge supports scheduling using a cron or rate expression.

Scheduling at scale

while you can use rules to schedule tasks, Amazon EventBridge is better suited for scheduling events at scale.

profile
Learner until Ending

0개의 댓글