Amazon EventBridge is a managed serverless event bus that you can use to connect your applications to various data sources. Amazon EventBridge was formerly known as Amazon CloudWatch Events. Any rules created in CloudWatch Events are also displayed in the EventBridge console. Amazon EventBridge has new features which are not added to CloudWatch Events.
Amazon EventBridge is a rule-driven event router. You can define event patterns based on the content of the events EventBridge receives and you can decide which subscribers will receive each event. Amazon Lambda functions, Kinesis streams, SQS queues, or even other Event Buses in different AWS accounts can be subscribers to an EventBridge.
There are some partner integrations available with Amazon EventBridge. This means events can act as webhooks and partner applications can send you events based on something in their system. Some of the SAAS partners include applications like Auth0, MongoDb, Freshworks, Zendesk etc.
How does it work?
The following steps summarize how an Amazon EventBridge works:
- When there is a state change in a system, the system will send you an event describing the state change. For example, let's say you have connected Zendesk with an Amazon EventBridge and when there is a change in the status of a ticket, you will receive an event describing the same.
- All events are associated with an event bus and each event bus has different targets or subscribers associated with it.
- When an event is received at an event bus, based on the associated rules, the events are passed on to the various targets.
- Amazon EventBridge also has a schema registry which stores the definitions of the schema of the events sent to an event bus. This is helpful during the development process as you can use it to generate types for your code.
- Amazon EventBridge also supports archival and replay of the events at a later time. This is useful for testing purposes as well as using this as an event source for your applications and new consumers.
Benefits of Amazon EventBridge
Some of the benefits of Amazon EventBridge are:
- Connect SAAS Applications: As we were discussing earlier, Amazon Eventbridge has some SAAS partners which can connect directly with an event bus in your AWS account. You can receive events from these applications and can write a custom logic to trigger based on those events.
- Event Driven Applications: As Amazon EventBridge is a managed service, it simplifies the development of an event-driven application. The amount of integration code required to connect two applications is reduced and this also improves your developer experience.
- Less Operational Overhead: Like other managed Amazon services, Amazon EventBridge also has less maintenance overhead. There are no servers to provision, and no maintenance and patching of other servers are required.
Amazon EventBridge can be a great asset in your serverless architecture. Serverless is all about events and functions and Amazon EventBridge can act as an important central point to manage and scale the use of events in your architecture.