First EventBridge Rule
Event-driven.
Initial setup
The first EventBridge bus is the discipline of separating application events from AWS service events. Custom buses keep ownership clean.
- Default bus. Per-account, receives AWS service events; do not mix application events here.
- Custom event bus. Per-application dedicated bus; isolation from the default keeps the boundaries clear.
- Permissions. Per-producer PutEvents grant; per-consumer rule-defined target; least privilege is mechanical.
- IaC from day one. Terraform or CDK definitions; bus configuration reviewed in PRs, not clicked in console.
Event rules
Rules are where EventBridge value lives. Pattern matching on JSON, multiple targets per rule, schedule rules that replaced standalone CloudWatch Events.
- Pattern matching. JSON path on event content; match specific attributes; route precisely.
- Multiple targets. Per rule, fan out to Lambda, SNS, SQS, Step Functions; one event drives many actions.
- Schedule rules. Cron-like or rate-based triggers; replaces standalone CloudWatch Events for cron jobs.
- Input transformer. Reshape payload per target; downstream consumers get exactly the shape they expect.
Debugging
EventBridge debugging is its own discipline. CloudWatch Logs, dead-letter queues, schema registry, PutEvents test calls cover most investigations.
- CloudWatch Logs. Per-rule failed-delivery log; first stop when an event did not reach its target.
- Retry plus DLQ. Per-rule retry policy plus dead-letter queue; catches permanent failures.
- Schema Registry. Per-bus auto-discovered schema; useful for third-party sources where you do not control the payload.
- PutEvents test calls. Synthetic payload to verify rule matching before real traffic; run from CLI or console.
Operating EventBridge
Operating EventBridge is its own discipline. IaC, per-rule monitoring, quarterly audit; the basics that prevent rule sprawl.
- IaC for rules. Terraform, CDK, or SAM; avoid click-built production rules; reviewable changes.
- Per-rule monitoring. Invocation rate, failure rate, latency; standard panels per rule.
- Quarterly rule audit. Invocation-rate review; surface unused rules ready for retirement.
- Per-rule owner. Named owner team; ownerless rules accumulate and rot; the audit is owned, not orphaned.