EventBridge

Amazon EventBridge is a serverless event bus which delivers streams of events from event sources (applications, AWS resources, etc.) that to targets (e.g. API Gateway, or Lambda) based on a set of rules.

Concepts

  • Buses act as brokers between event sources and targets, and serve as the boundary for rules.
    • The default bus (per-account, per-region) receives AWS resource events.
    • Custom buses can be created to send/receive events from different accounts and regions.
  • Event sources
    • AWS resources send events on configuration and state changes.
    • Partner event sources allow AWS SaaS partners to push events to EventBridge buses.
    • The PutEvents API method allows pushing custom events to the bus.
  • Events indicate changes to AWS resources, e.g. an EC2 instance changes its state from Pending to Running after it's allocated a host or an application event.
  • Rules match incoming events and route them to targets (a single event can be routed to multiple targets) for processing.
    • Event patterns specify conditions to determine which events match the rule.
    • Schedules allow a rule to run at a specified time interval.
  • Input transformers can define up to 100 additional variables on an event by extracting nested field values or concatenating multiple fields using JSON path expressions.
  • Targets receive JSON payloads representing events' data and can perform actions based on it.
  • Schemas describe event patterns
    • Schemas for AWS services are already available
    • Custom schemas can be created
  • Archives allow for rolling retention of event history.

Operations

  • Archive (save)
  • Replay

Backlinks