devuplabs.cloud
PreviewLab6 hours

Event Buses & Rules

Build custom event buses, write content-based rules, and route events to Lambda, SQS, and CloudWatch Logs.

Mental model

EventBridge is a serverless event router. Events flow in, rules match them, targets receive them. Think of it as a post office, events are letters, rules are sorting criteria, targets are mailboxes. The post office never stores the letter, it routes it and moves on.

Prerequisites

0 of 5 checked

What is EventBridge?

The core idea

EventBridge is AWS's serverless event bus. It receives events from three sources:

  1. AWS services: EC2 state changes, S3 object uploads, ECS task state changes, CodePipeline stage transitions, 100+ others. All emitted automatically.
  2. Your application: custom events you PutEvents onto a custom bus. Your order placed, your user signed up, your payment processed.
  3. SaaS partners: Datadog, Zendesk, Stripe, etc. can send events directly into your EventBridge bus.

You write rules that pattern-match incoming events. Matching events are routed to one or more targets: Lambda, SQS, SNS, ECS, Step Functions, another event bus, an HTTP endpoint, and more. What EventBridge is NOT:

  • Not a queue (no retention, no polling, no consumer groups)
  • Not a stream (no replay from offset, no ordering guarantee)
  • Not a pub/sub topic (no fan-out to subscribers, that's SNS)

It is purely a router. Events in, matched events out to targets.

javascript
Event sources                EventBridge               Targets
┌──────────────┐             ┌────────────┐
│ AWS Services │ ─events─▶   │ Event Bus  │ ─match─▶   Lambda
└──────────────┘             │            │ ─match─▶   SQS
┌──────────────┐             │  Rules     │ ─match─▶   SNSYour App     │ ─events─▶   │  filter &  │ ─match─▶   ECS
└──────────────┘             │  route     │ ─match─▶   HTTP
┌──────────────┐             └────────────┘
│ SaaS (Stripe │ ─events─▶
│  Datadog...) │
└──────────────┘

Default Event Bus + AWS Service Events

Goal

Observe real AWS-generated events flowing through the default event bus. Write your first rule. Capture matching events in CloudWatch Logs. Trigger events by performing real AWS actions.

Unlock all 24 AWS services & 291+ lab sessions (~180 hours)

Pricing