Configure Amazon EventBridge in AWS Console
Amazon EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources.
It simplifies the building and management of event-driven applications by taking care of event ingestion and delivery, security, authorization, and error-handling for you. You can choose an event source on the Amazon EventBridge console and select a target from the list of AWS services and Amazon EventBridge will automatically deliver the events in real-time.
- Create an AWS account.
- Get Amazon AWS access key and Amazon AWS secret key.
You also need to create Event Buses and set Event Rules for Amazon EventBridge in AWS console as below.
Create Event Buses
Event buses receive events from any AWS services. A service or application that sends events to an event bus needs to know only about the event bus and does not need to know anything about the other services or applications that may consume the events.
Each AWS account has one default event bus which receives events generated by AWS services. You can also create multiple custom event buses to receive events from AWS services.
If User selects Event Bus Connection and performs CREATE operation this will be CreateEventBus Operation.
Name : Name of the event to be created.
Permissions : Manage permission groups for access to this event bus. You can provide access to either an AWS account or an organization as below.
-
Other AWS Account : - Individual AWS account ID (12-digit) : If Selected, you need to provide the 12-digit AWS account ID to which you want to send the events.
-
All AWS accounts : If Selected, Any AWS account could send events to your event bus.
noteFor this option, it is recommended that you write all your rules to accept events from only specified AWS accounts listed in the rule.
- Organization : - My organization : If Selected, the events will be sent to the AWS account within your organization.
-
Other organization : If Selected, the events will be sent to the AWS account outside your organization.
noteFor this option, the organization name must be prefixed with "o-" followed by 10 to 32 lower-case letters or digits
Create Event Rules
You define rules in your AWS account to process events. A rule watches for certain types of events and routes them to one or more targets you have specified. The targets then perform based on the original event.
When you create a rule, you can have it pass the JSON event text straight to the targets or customize the event text before passing it. You can edit, delete, enable/disable the rules created.
Select event bus
Select or enter the event bus name for the dropdown list. This is the list of events created in the Event Buses section.
Name: : Name of the Rule which is created.
Define pattern : Build or customize an Event Pattern or set a Schedule to invoke Targets.
-
Event Pattern : If configured, it makes this a rule that is triggered when an event matching the pattern occurs.
-
Pre-defined pattern : You can choose a pre-defined pattern that matches a certain type of event from a certain service. Even if you choose a pre-defined pattern, you can then edit the pattern to customize it.
You need to choose the following options to complete this process.
-
Service provider - AWS services or custom/partner services
-
Service name - The name of partner service selected as the event source
-
Event Type - The type of events as the source of the matching pattern
-
Operation types: You can select any or specific operations(s). Once configured, the Event Pattern will be displayed which can be edited if necessary.
-
Custom pattern : If configured, you can create your own set of event pattern(s).
-
Schedule : If Configured, it makes this a rule that is triggered regularly on the schedule you specify.
-
Fixed-rate every - Simple fixed-rate schedule that triggers every certain number of minutes, hours, or weeks.
-
Cron expression - Cron expression to create a more fine-grained schedule, such as “the first Monday of each month at 8 am.”
Schedules are not supported on custom or partner event bus.
Select Event Buses : Select an event bus for this rule.
- AWS default event bus
- Custom or partner event bus: Currently partner event bus is not in scope.
- Enable/Disable the rule on the selected event bus.
Select Targets : Select target(s) and configure associated fields to invoke when an event matches your event pattern or when a schedule is triggered (limit of 5 targets per rule).
Tags – optional : Enter Key and its value. You can add multiple tags to a rule.