Events are central to EventBridge. Events are observable, not directed.
The previous tightly-coupled APIs use direct commands, whereas an event-driven approach is observable. What’s the difference? (Click)
In a command model, each command is explicitly issued to a specific recipient. (Click – describe left)
Events on the other hand are merely observable by other systems. (Click - describe right image)
Benefits:
event producers don’t need to have any knowledge about who is listening to those events.
This keeps them simple.
Allows other services to consume events without needing upstream changes.
For that, we need an event bus:
- Provides an endpoint where an event producer can send events
- The router manages directing and filtering those events to the appropriate downstream consumers.
- Consumers can get the events they care about reliably while the producers remain decoupled.
This is Amazon EventBridge – a serverless event bus service.
Helps you ingest/route events from SaaS applications, AWS services and your own systems.
Some of the notable features:
It’s serverless, so no infrastructure to manage/ provision.
Scaling is handled; pay for what you use.
Offers native integrations with 21 SaaS providers with more to come.
Traffic travels internally within AWS infrastructure – not on the Internet.
Integrates with over 90 AWS services as sources, and 17 services as targers
$1/million events. No charge for events sourced from AWS services.
EventBridge can improved availability:
In synchronous APIs, the availability of the entire system can be impacted by the failure of any single service.
Moving towards an async infra based around events allows more resilience + with the right architecture design can improve availability.
Finally, third party integration:
Instead of using polling or webhooks, you can ingest data seamlessly and in near-realtime using events.
EventBridge offers SaaS integrations with a growing number of providers that can treat new data in these systems as events.
How does it work?
It all starts with an event source:
any one of 95 AWS services-
your Lambda functions/apps
SaaS applications
Event busses are at the core of EventBridge.
Every account has a default event bus – if you used CloudWatch Events previously, you’ll be familiar with the default event bus.
With EventBridge, you can also create your own custom event buses.
There are also buses dedicated to ingesting partner events.
Next, you associate rules with your event bus.
These filter the incoming events and determine the routing to selected targets.
You can associate multiple targets with each rule – up to 5 targets.
Targets allow you to:
invoke a Lambda function
put a record on a Kinesis data stream or firehose
start the execution of a step functions workflow
or start a task using ECS or Fargate.
Now you’ve seen the concepts behind EventBridge, let’s take a look at the console.
Here’s an example incoming event – it’s just JSON.
Rules allow you to match against values in the metadata of event payloads and determine which events should get routed to which target destinations.
This event matches because the rule accepts departments that match billing or fulfillment.
This doesn’t match the rule since the detail-type of the event is “Ticket created”, but the rule is filtering for “Ticket resolved”.
This event matches because the rule accepts departments that match billing or fulfillment.
This event matches because the rule accepts departments that match billing or fulfillment.
This event matches because the rule accepts departments that match billing or fulfillment.
For SaaS application integration, special resource = Partner Event Source.
Logical connection between SaaS and your AWS account without need cross-account IAM roles/creds.
Recently the EventBridge Schema Registry was launched which allows you to discover, create, and manage OpenAPI schemas for events on EventBridge. You can find schemas for existing AWS services, create and upload custom schemas, or generate a schema based on events on an event bus. For all schemas in EventBridge you can generate and download code bindings to quickly help you build applications that use those events.
Recently the EventBridge Schema Registry was launched which allows you to discover, create, and manage OpenAPI schemas for events on EventBridge. You can find schemas for existing AWS services, create and upload custom schemas, or generate a schema based on events on an event bus. For all schemas in EventBridge you can generate and download code bindings to quickly help you build applications that use those events.
Some of the notable features:
It’s serverless, so no infrastructure to manage/ provision.
Scaling is handled; pay for what you use.
Offers native integrations with 21 SaaS providers with more to come.
Traffic travels internally within AWS infrastructure – not on the Internet.
Integrates with over 90 AWS services as sources, and 17 services as targers
$1/million events. No charge for events sourced from AWS services.
Thank you for sticking around until the end.
I hope this has been a useful and informative tech talk for you.
Thanks.