• Articles

What is AWS EventBridge?

What is AWS EventBridge?

From event sources like Zendesk or Shopify, EventBridge sends real-time data to AWS Lambda and other SaaS apps

You can decide where your data should be routed by configuring routing rules, allowing you to build application architectures which respond in real-time to your data sources, with event publisher, and consumer completely decoupled.

Table of contents:

Check out our video on AWS Training to learn more about AWS!

Video Thumbnail

AWS EventBridge Building Components

AWS EventBridge Building Components

Events

Any real-time modification in data, or environment is known as an Event. This change could happen in your application, an AWS service, or a SaaS partner service.

Event sources

An event source is a device that receives events from a SaaS provider, AWS Services, or your own applications.

Event buses

A pipeline that receives events is referred to as an event bus. The rules of the event bus analyze events as they come. Each rule determines whether an occurrence meets the rule’s conditions.

Event Bus Types

  1. Default event bus: By default, this service receives events from any AWS service.
  2. Custom event bus: It must be manually constructed and receives events from bespoke applications you design.
  3. Partner event bus: Events are received from SaaS partner applications and must be manually developed.

Rules

Incoming events are matched by rules and sent to targets for processing. A single rule can transmit a possibility to many targets, which then operate in parallel. Rules are either event patterns or schedules.

  • An event pattern defines the structure of an event as well as the fields that must be matched by a rule.
  • Schedule-based rules act at regular periods.

Targets

When an event meets the event pattern provided for a rule, EventBridge transmits it to a target.

The event data is processed by the rule, and the relevant information is sent to the destination.

EventBridge requires access to the destination resource in order to deliver event data to it. Each rule can have up to five targets.

Cloud Computing IITM Pravartak

AWS EventBridge Benefits

AWS EventBridge Benefits

Let’s discuss in brief about various benefits of using EventBridge:

Build event-driven architectures

Developing event-driven systems is made simpler by EventBridge. Due to the ability to filter and publish directly to EventBridge, there is no longer a need for event targets to be informed of event sources.

There is no setup required. Using loosely coupled event-driven architectures, you can increase application durability and developer productivity.

Connect SaaS apps

Without the need for additional integration code, AWS EventBridge may ingest data from compatible SaaS applications and direct it to AWS services and SaaS targets (with the assistance of API destinations).

You can use EventBridge to link your SaaS applications, or you can use events from your SaaS applications to start workflows for customer support, business operations, and other purposes.

Write less custom code

Using EventBridge, connecting applications is simple. You can easily consume, filter, alter, and distribute events without writing any new code.

For you to define events as strongly typed objects in your code, the EventBridge schema registry offers a collection of conveniently accessible event schemas and makes it possible for you to obtain code bindings for those schemas in your IDE.

Schemas retrieved from your event bus are automatically added to the registry using the schema discovery function.

Reduce operational overhead

With EventBridge, there are no servers to set up, patch, or maintain.

Installation, upkeep, and operation don’t call for any further software.

You only pay for events broadcast by your AWS or SaaS services, and EventBridge scales automatically based on the quantity of events consumed.

AWS EventBridge Use Cases

AWS EventBridge Use Cases

Build event-driven architectures

EventBridge makes it easier to develop event-driven systems.

Applications have the ability to publish events to the event bus without informing the subscribers first, and they can also subscribe to events without the publisher’s awareness.

Re-architect for speed

With decoupled services and apps, EventBridge can enable you to swiftly change and re-orchestrate your architecture.

The requirement for intensive coordination between event producers and apps or services is removed by EventBridge. Teams can work independently as a result of this decoupling, which speeds up development and improves adaptability.

AWS environments monitoring and auditing

In addition, you can monitor and audit your AWS environments in real-time, as well as react to changes occurring in your apps, to avoid infrastructure risks and take appropriate action.

Simply construct rules to specify which AWS events are of interest to you and what automated actions should be taken when a rule matches an event.

Set a rule, for example, to run an AWS Lambda function to resolve an issue or to inform an Amazon SNS topic to notify an operator.

Extend functionality via SaaS integrations

EventBridge makes it simple to integrate your SaaS applications with other SaaS services to expand their functionality.

When a new user is created on a free tier, for example, you may submit a custom event to EventBridge and then utilize API Destinations to deliver that event to Zendesk CRM.

Customize SaaS with AI/ML

By incorporating AWS Artificial Intelligence/Machine Learning services with SaaS application events, you can gain valuable insights.

For example, you might integrate data from Shopify into EventBridge to start a workflow and then utilize AI services like Amazon Comprehend to classify images of new retail products.

Get 100% Hike!

Master Most in Demand Skills Now!

AWS EventBridge targets

AWS EventBridge targets

EventBridge communicates an event to a target when it complies with the event pattern specified for a rule. The rule processes the event data, and the destination receives the pertinent data.

To send event data to the destination, EventBridge needs access to the target resource. You can specify up to five targets for each rule.

Any new or modified targets may not be immediately activated when you add targets to a rule and then run that rule. Give the changes a brief window of time to take effect.

Targets available in EventBridge

Below mentioned are a few of the event targets  in the EventBridge console:

  • API destination
  • API Gateway
  • CloudWatch log group
  • CodePipeline
  • CodeBuild project
  • EC2 Image Builder
  • Kinesis stream
  • Redshift cluster
  • SNS topic

Target parameters

Some targets utilize the event as a trigger to access a particular API; they do not give the target with the event payload data. EventBridge uses the Target parameters to determine what occurs with that target.

Below mentioned are a few of those parameters:

  • BatchParameters ( AWS Batch jobs )
  • HttpParameters ( Amazon API Gateway & 3rd party ApiDestination endpoints )
  • EcsParameters ( Amazon ECS tasks )
  • KinesisParameters ( Amazon Kinesis streams )
  • SqsParameters (Amazon SQS queues )

Dynamic path Parameters

Some target parameters also support dynamic JSON path syntax. With this method, JSON paths can be specified in place of static values. (Take $.detail.state, for example.)

The entire value, not just a piece of it, must be a JSON route. Consider RedshiftParameters as an illustration. SQL can be $.detail.state but it can not be “SELECT * FROM $.detail.state”.

These paths are dynamically replaced at runtime with information from the event payload itself at the given path. As a result of input transformation, dynamic path parameters cannot connect to newly formed or updated values.

The syntax for JSON routes with dynamic parameters is the same as for input transformation.

With the use of dynamic syntax, all of these parameters’ non-enum fields can be used:

  • EcsParameters
  • RedshiftDataParameters
  • SageMakerPipelineParameters
  • HttpParameters

Permissions

To make API requests on your resources, EventBridge needs sufficient access. For resources such as AWS Lambda and Amazon SNS, EventBridge uses resource-based rules.

EventBridge uses IAM roles for EC2 instances, Kinesis data streams, and AWS Step Functions state machines that are given in the RoleARN argument in PutTargets.

The following section of your KMS key policy must be present if your target is encrypted.

{
    "John": "Allow EventBridge to use the key",
    "Effect": "Allow",
    "Principal": {
        "Service": "events.amazonaws.com"
    },
    "Action": [
        "kms:Decrypt",
        "kms:GenerateDataKey"
    ],
    "Resource": "*"
}

Conclusion

The introduction of EventBridge made certain significant challenges with SaaS platform integration with AWS services easier to address.

The use of contemporary AWS services has also become considerably easier and more seamless. When compared to other AWS services, it is clear that EventBridge has the potential to be an essential part of a contemporary, highly distributed microservices design, even though CloudWatch Events, SNS, and Kinesis all have their benefits.

Course Schedule

Name Date Details
AWS Certification 30 Nov 2024(Sat-Sun) Weekend Batch View Details
07 Dec 2024(Sat-Sun) Weekend Batch
14 Dec 2024(Sat-Sun) Weekend Batch