AWS EventBridge

What is AWS EventBridge?

AWS EventBridge is a key service used in many architectures. EventBridge is a highly scalable central stream of events.

Event publishers can be AWS services or other applications. An event driven architecture allows for a loosely coupling which in return allows for independent scaling, reusable and extensible applications while keeping complexity low.

What Is The Flow Of Events?

EventBridge Flow Of Events
  1. AWS services or other applications publish events to EventBridge Buses
  2. EventBridge rules filter events in buses by some event metadata and forward the events to defined targets
  3. Targets i.e. AWS services like lambda, SNS, SQS, etc. or others applications receive and process events

How To Organize Events At Scale?

With many services creating events, it can get hard to keep track of all the event schemas/structures.

To help us with that task EventBridge provides us with schema registries and auto discovery. This way we developers can easily search and browse events schemas at a central location.

How To Prevent Unexpected Costs?

In a nightmare scenario it could happen that a rule, based on an event, detects a change in a S3 bucket policy triggering another service which is also changing the policy on that bucket. Do you see the problem?

The described scenario might lead to an infinite-loop causing sky-rocketing costs.

To prevent this, we should always make sure that a triggered action does not lead to a retriggering of the event i.e. rule.

We should also have appropriate monitoring / alerting in place letting us know that something like the scenario mentioned is happening.

How To Troubleshoot and Debug?

For many reasons, an event might not reach a destination. In such instances it might not be easy to answer the question "Why?".

To help us in such instances we should use a "Dead-Letter Queue". EventBridge can send events, failed to be delivered, to a dead-letter queue adding important information to the message that might help us understand and solve the delivery issue.

Other EventBridge Details

  • You can configure 300 rules per event bus
  • Depending on the region, there are soft limits to the amount of events published per second highest being 10k/s and lowest being 400/s
  • You can create a maximum of 100 buses per account
  • Event patterns used in rules can have a maximum of 2048 characters
Adnan Mujkanovic

Adnan Mujkanovic

Curious by nature, I love learning and grasping new concepts. My areas of interest are Software Development, DevOps, Economics, Philosophy and Science.