AWS — Amazon EventBridge Overview
What is Amazon EventBridge? — Introduction to AWS EventBridge.
TL;DR:
Amazon EventBridge is a serverless, fully managed, and scalable event bus that enables integrations between AWS services, Software as a services (SaaS), and your applications.
EventBridge was formerly called Amazon CloudWatch Events. Amazon CloudWatch Events and EventBridge are the same underlying service and API, however, EventBridge provides more features.
Introduction to AWS EventBridge
EventBridge makes it easier to connect applications. You can ingest, filter, transform and deliver events without writing custom code.
EventBridge allows you to build event-driven architectures, which are loosely coupled and distributed. This improves developer agility as well as application resiliency and it takes care of event ingestion and delivery, security, authorization, and error-handling for you. It enables you to decouple your architectures to make it faster to build and innovate, using routing rules to deliver events to selected targets.
EventBridge delivers a stream of real-time data from your applications, SaaS applications, and AWS services to targets such as AWS Lambda functions, HTTP invocation endpoints using API destinations, or event buses in other AWS accounts.
EventBridge Building Blocks (Components)
Events
An event is a real-time change in a system, data, or environment. This change can be either in your application or in an AWS service or a SaaS partner service.
Event sources
An event source is used to ingest events from a SaaS partner, AWS Services, or your own applications.
Event buses
An event bus is a pipeline that receives events. Rules associated with the event bus evaluate events as they arrive. Each rule checks whether an event matches the rule’s criteria.
Event Bus Types:
- Default event bus: Created by default and receives events from any AWS service.
- Custom event bus: Receives events from custom applications you create and must be created manually.
- Partner event bus: Receives events from SaaS partner applications and must be created manually.
Rules
A rule matches incoming events and sends them to targets for processing. A single rule can send an event to multiple targets, which then run in parallel. Rules are based either on an event pattern or a schedule.
- An event pattern defines the event structure and the fields that a rule matches.
- Rules that are based on a schedule perform an action at regular intervals.
Targets
A target is a resource or endpoint that EventBridge sends an event to when the event matches the event pattern defined for a rule. The rule processes the event data and sends the pertinent information to the target. To deliver event data to a target, EventBridge needs permission to access the target resource. You can define up to five targets for each rule.
Features
Advanced Event Rules Filtering
You can filter events with rules. Rules allow different application components to look for and process the events that are of interest to them. A rule can customize an event before it is sent to the target by passing along only certain parts or by overwriting it with a constant. You can also have multiple rules that match on the same event, so different microservices or applications can choose to match events based on specific filters.
Content-based Event Filtering
EventBridge supports declarative content filtering using event patterns. With content filtering, you can write complex event patterns that only match events under very specific conditions.
It supports the following types of pattern matching:
- Prefix matching.
- Anything-but matching.
- Numeric matching.
- IP address matching.
- Exists matching.
- Complex example with multiple matching.
Schema Registry
Schema registries are containers for schemas. EventBridge schema registry stores event schema in a registry that other developers can easily search and access, so you don’t have to find events and their structure manually.
You can create custom registries to organize the schemas you create or upload.
Message Transformation
EventBridge can transform target inputs. In specific use cases, you might want to customize the text of event fields before passing them to a target so that these fields provide more meaningful information to process them further.
Custom Events
You can send custom events from your own applications to an event bus. Other applications can receive events through any of supported AWS target services.
Archive and Replay Events
You can create an archive of events so that you can easily replay (reprocess) them at a later time. This feature enables developers to debug their applications quickly, extend them by hydrating targets with historic events, and recover from errors. For example, you might want to replay events to recover from errors or to validate new functionality in your application.
SaaS Apps Integration
EventBridge is natively integrated with SaaS applications from many providers including Datadog, PagerDuty, SugarCRM, Zendesk, and many more. Your AWS applications can take action based on events that SaaS applications generate.
API Destinations
With the new API destinations feature, EventBridge can now integrate with services outside of AWS using REST API calls. EventBridge enables developers to send events back to your own applications, on-premises or software as a service (SaaS) applications with the ability to control throughput and authentication. It can help decouple applications and produce more extensible, maintainable architectures.
Scheduled events
You can set up scheduled events using the popular Unix cron syntax. Scheduled events are generated on a periodic basis and invoke any of the supported target AWS services (e.g. Lambda).
Many built-in event sources and targets
EventBridge is directly integrated with over 130 event sources and over 35 targets, including Lambda, SQS, SNS, Step Functions, Kinesis, and many more.
Reliable event delivery
EventBridge provides at-least-once event delivery to targets, including retry with exponential backoff for up to 24 hours. Events are stored durably across multiple Availability Zones (AZs), providing additional assurance your events will be delivered to their destination. EventBridge also provides a 99.99% availability service level agreement (SLA), ensuring your applications are able to access the service reliably.
Use Cases
Build event-driven architectures
EventBridge simplifies the process of building event-driven architectures. Applications or microservices can publish events to the event bus without awareness of subscribers and Applications or microservices can subscribe to events without awareness of the publisher.
Re-architect for speed
Use EventBridge to accelerate modernizing and re-orchestrating your architecture with decoupled services and applications. With EventBridge, there is no need for heavy coordination between event producer and consumer applications or services. This decoupling allows teams to work independently, leading to faster development and improved agility.
AWS environments monitoring and auditing
You can monitor and audit your AWS environments and respond to operational changes in your applications in real-time to prevent infrastructure vulnerabilities and take corrective action.
You simply write rules to indicate which AWS events are of your interest and what automated actions to take when a rule matches an event. For example, set a rule to invoke an AWS Lambda function to remediate an issue, or notify an Amazon SNS topic to alert an operator.
Extend functionality via SaaS integrations
You can extend the functionality of your applications by easily connecting them to other SaaS applications via EventBridge.
For example, you can send custom events to EventBridge when a new user has been created in a free tier and send that event via API Destinations to Zendesk CRM.
Customize SaaS with AI/ML
You can enrich your events from SaaS applications using AWS Artificial Intelligence/Machine Learning services and gain valuable insights.
For example, you can load your data from Shopify to EventBridge to trigger a workflow and use AI services such as Amazon Comprehend for image tagging of new retail products.
Summary
EventBridge is a serverless event bus that makes it easy to connect applications together and it is recommended when you want to build an application that reacts to events from SaaS applications, AWS services, or custom applications.
View more from Awesome Cloud
- Difference between SQS and SNS
- Difference between Application load balancer and Network load balancer
- Difference between Security Groups and NACL
- Difference between Amazon Aurora and Amazon RDS
- Difference between Internet Gateway and NAT Gateway
- Difference between Secrets Manager and Parameter Store
Happy Clouding!!!