> For the complete documentation index, see [llms.txt](https://anon-coders-notes.gitbook.io/techwriterdev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://anon-coders-notes.gitbook.io/techwriterdev/cloud/aws/developerassociate/services/17_monitoring/04_amazoneventbridge.md).

# Amazon EventBridge

* *(formerly CloudWatch Events)*

## Icon

![EventBridge](https://icon.icepanel.io/AWS/svg/App-Integration/EventBridge.svg)

## About

### Terminologies

* **Creation:** Based on events happening in different AWS sources `EventBridge` receives events from different sources such as,
  * Scheduled CronJobs
  * Event Rules enables to react
    * Based on **event pattern** to react to a service doing something and send details to destination.
    * Based on a schedule.
* **Filtering:** Events can be filtered at event bridge.
* **Event:** JSON document about event details. The `detail-type` field in the event specifies type of event, which has to be defined for a service. The `detail` field specifies explicit details of `detail-type`.
* **Destinations:** Different destinations can be configured such as Trigger Lambda Functions, send SNS/SQS messages to different Destinations or Event Bus in another AWS account.
* **Event Bus** - An EventBridge event bus is a channel that ingests events from producers and routes matching events to consumers using rules.

***

* Event Bus can be accessed by other AWS accounts using Resource based policies.
* Events sent to EventBridge *(all/filtered)* can be archived and for a period of time/indefinitely, also these archived events can be replayed.
* Execution role is needed for EventBridge to send the events to target.

***

### Partner EventBus

* Allows to integrate i.e send events from different AWS SAAS Partner products like `DataDog`, `Zendesk` etc to Event Bridge.

### Custom EventBus

* By default, AWS services sends event to default event bus in Event Bridge.
* Applications can send events to custom event bus, which can process events based on its logic.
* Refer [this](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-event-bus.html) to see how we can create one.

***

### Integrations

#### Partner Event Sources

* Partners can send events to AWS Event Bridge via Integrations available in AWS.

#### API destination

* Allows to invoke third party integrations via HTTP API as destination from Event Bridge.

### Schema Registry

* Event Bus can analyse the events in your bus and infer the schema.
* The `Schema Registry` allows you to generate code for application, that will know in advance how data is structured in the event bus.
* Schema can be versioned.

### Resource based policies

* Allow to manage permission for a specific Event Bus.
* With it one can Allow/Deny events from another AWS account or AWS region.
* We can aggregate all events from one AWS Organtization in to a common single AWS account or AWS region via central event bus and access controlled via resource based policy.
