Amazon EventBridge
Rationale
Amazon EventBridge is the service we use for event routing and scheduling workloads in the cloud. It allows us to react to changes in our AWS infrastructure, route events between services, and run recurring jobs on a schedule, all without managing any infrastructure. The main reasons why we chose it over other alternatives are the following:
- It is a fully managed serverless service. There is no infrastructure to provision or manage, and it scales automatically with the volume of events.
- It integrates seamlessly with AWS services such as Lambda, Batch, and CloudWatch, allowing us to connect producers and consumers with minimal configuration.
- It complies with several certifications from ISO and CSA. Many of these certifications are focused on ensuring that the entity follows best practices regarding secure cloud-based environments and information security.
- It supports schedule-based rules using cron and rate expressions, enabling recurring workloads.
- It supports event pattern matching for filtering and routing events based on their content and structure.
- It provides built-in retry policies and dead-letter queues, improving reliability when targets fail.
- It supports cross-region event routing via custom event buses, allowing us to aggregate events from multiple regions into a central bus.
Alternatives
- Google Cloud Eventarc : Provides event-driven orchestration on GCP, but adopting it would require supporting another cloud provider, fragmenting our stack and know-how.
- Azure Event Grid : Offers event routing on Azure, but using it would introduce a second cloud platform to manage, adding complexity and operational overhead.
- Amazon SNSÂ / Amazon SQSÂ : Viable for simple pub/sub and message queuing, but they lack native schedule expressions and content-based event pattern matching.
- Cron on EC2: Requires managing infrastructure, has no built-in retry or routing capabilities, and does not integrate natively with other AWS services.
Usage
We use EventBridge for:
- Scheduling Batch jobs and lambdas for ETLs, background processes, and CI tasks like clean environments or remove branches.
- Reporting failing Batch jobs to create metrics.
- Notifying development mail list about costs anomalies by Cost Anomaly Detection.
- Notifying development mail list about security findings by GuardDuty.
Other AWS services like EKS, Inspector, or Step Functions create EventBridge triggers too.
Last updated on