1.Event buses, rules, targets, and patterns
An event bus receives events and routes them. A rule watches the bus for events matching an event pattern (or a schedule) and sends matches to one or more targets. An archive stores matched events so you can replay them later.
Key features
- Every account has a default event bus (receives events from AWS services and PutEvents); you can also create custom buses and partner buses for SaaS integrations
- A rule matches events either by an event pattern (JSON matched against the event's source/detail-type/detail fields) or by running on a schedule
- A single rule can send to up to 5 targets by default, and they run in parallel, not in sequence
- A failed target invocation retries per the rule's RetryPolicy (MaximumRetryAttempts: 0–185, MaximumEventAgeInSeconds: 60–86,400) — once retries are exhausted, the event goes to a dead-letter queue (a standard SQS queue) if one is configured
- An archive is scoped to one source event bus (fixed at creation) and stores events matching an optional event pattern; replay can only send events back to that same source bus, and up to 10 replays can run concurrently per account per Region
- Cross-account delivery: the receiving account's event bus grants a resource-based policy to the sender account (or an AWS Organization); the sender account then creates a rule targeting the receiver's event bus ARN
- Event source
- leads to Event bus (PutEvents)
- Event bus
- leads to Rule (pattern or schedule) (evaluated against)
- leads to Archive (optional) (matching events copied)
- Rule (pattern or schedule)
- leads to Target(s) (matched → invoke (up to 5, parallel))
- Target(s)
- Archive (optional)
Signature
bus → rule (pattern | schedule) → up to 5 targets, parallel
Bus routes, rule matches (pattern or schedule) and fans out to up to 5 parallel targets, archive stores a copy for replay back to the same source bus. Cross-account needs a resource policy on the receiving bus plus a rule on the sending side.