This guide covers core concepts, common integration patterns, limits to consider, cross-account routing, DLQs, transformers, archives & replay, EventBridge Pipes, message attributes, monitoring, costs, and security best practices. Links to AWS docs are included for deeper reference.

EventBridge: core concepts
EventBridge provides an event bus that receives and routes events, rules that match patterns against events, and targets that act on matched events. Use EventBridge when you need centralized routing, transformation, cross-account/event‑driven workflows, or complex pattern matching.

source, detail-type, and nested values inside detail. Example EventBridge rule pattern fragments:
SNS: core concepts and delivery
SNS provides topics and multi‑protocol subscribers (HTTP/S webhook, email, SMS, Lambda, SQS, mobile push). Key features include massive scaling, subscription filter policies based on message attributes, and support for Standard and FIFO topics.
Common integration pattern
A typical pattern in incident response:- An event source (e.g., EC2 state change) publishes to EventBridge.
- An EventBridge rule matches and forwards to an SNS topic (optionally transforming the payload).
- SNS fans out to subscribers: humans (email/SMS), webhooks, SQS queues for workers, or Lambda functions for automated remediation.


Fan‑out architecture patterns
- Simple fan‑out: SNS -> multiple subscriptions (notification-centric).
- Processing fan‑out: EventBridge -> multiple Lambda functions (processing-centric).
- Hybrid: use EventBridge for routing/filters and SNS for broad multi‑protocol delivery.

SNS subscription filter policies and attributes
SNS message attributes are key/value metadata separate from the message body; they enable efficient filtering and prevent subscribers from receiving irrelevant messages. Limits and types:- Up to 10 message attributes per message.
- Supported attribute types: String, Number, Binary.
- Maximum total message size (SNS + SQS) is 256 KB.

Cross-account event routing (centralized monitoring)
Centralized event monitoring often requires events to flow from multiple AWS accounts into a central account for unified rules, alerting, and remediation. Typical components:- Central account: create a custom EventBridge event bus (destination).
- Central account: add a resource-based policy on the destination bus to allow source accounts to PutEvents.
- Source accounts: grant IAM permissions to PutEvents to the central bus.
- Central account: create rules on the centralized bus for monitoring and remediation.


Dead‑letter queues (DLQs) and error handling
DLQs preserve messages that repeatedly fail delivery so you can investigate and reprocess them. Typical flow: initial delivery attempts → automatic retries (with exponential backoff) → after retry exhaustion route to DLQ.

- Configure retry policies and exponential backoff before relying on DLQs.
- Use SQS queues as DLQs so they can be polled and processed.
- Monitor DLQ metrics (queue depth, message age) and alert on thresholds.
- Retain messages long enough for investigation, but implement retention policies to avoid indefinite storage.

Always ensure DLQs are monitored and have an automated or manual process to process and clear messages — DLQs should not be a garbage sink.
Input transformers, archives, and replay
- Input transformers: reshape event content before delivery to targets to improve readability, remove sensitive data, or add contextual fields (environment/team). Example: transform an EC2 state-change event into a concise human-readable alert.
- Archives & replay: archive events from a bus and replay them later for testing, reprocessing after an outage, debugging, or disaster recovery. Archives can retain events from one day to indefinitely.

- Create an archive for the event bus.
- Ensure events are captured into that archive.
- Initiate a replay to a chosen target for reprocessing or testing.


EventBridge Pipes (point‑to‑point flows)
EventBridge Pipes simplify dedicated, low‑latency one‑to‑one integrations between supported sources and targets without using the bus. Pipes support filtering, enrichment, batching, ordering for FIFO sources, and DLQs.

Monitoring recommendations
Track these metrics and logs to maintain observability and SLOs:
Use CloudWatch Alarms and centralized dashboards for alerting; enable AWS X-Ray for distributed tracing where supported.

Cost considerations and optimization
High-level cost drivers:- EventBridge: charged per published event.
- SNS: charged per request/delivery; cost varies by protocol and destination volume.
- Target executions (Lambda invocations, API calls) are often the dominant cost.
- Filter at EventBridge so only relevant events reach downstream services.
- Use SNS message filtering to reduce fan‑out where possible.
- Batch events for targets that support batching.
- Reduce unnecessary downstream processing; prefer direct webhooks for low‑latency, low‑volume targets when appropriate.

Security best practices
- Apply resource‑based policies and least‑privilege IAM for access control.
- Encrypt SNS topics and sensitive data at rest using KMS.
- Isolate event buses for different teams/environments to reduce blast radius.
- Enable CloudTrail and centralized logging for auditability.


Schema Registry
Enable schema discovery on an EventBridge bus to automatically generate JSON/OpenAPI schemas from observed events. The registry provides versioned schemas and downloadable language-specific code bindings to make development more type-safe and consistent.
When to use EventBridge vs SNS vs SQS


- EC2 → EventBridge → SNS → Notify on‑call for instance state changes.
- API Gateway → SNS → SQS (FIFO) → Lambda for order processing.

Key takeaways
- EventBridge is the intelligent event router — use it for complex routing, filtering, transformations, and integrations.
- SNS is the multi‑protocol fan‑out notification system — ideal when many endpoints or different protocols need the same message.
- Combine EventBridge and SNS for powerful event-driven architectures (filter at the bus, fan out with SNS).
- Be aware of limits: ~300 rules per bus, 5 targets per rule, millions of subscribers per topic (varies), 10 message attributes per message, 64 KB event max, and 256 KB SNS/SQS message max.
- Use DLQs, input transformers, archives & replay, Pipes, and the Schema Registry to build reliable, testable, and maintainable systems.

- AWS EventBridge: https://docs.aws.amazon.com/eventbridge/
- AWS SNS: https://docs.aws.amazon.com/sns/
- AWS SQS: https://docs.aws.amazon.com/sqs/
- CloudWatch metrics & logs: https://docs.aws.amazon.com/cloudwatch/
- KMS encryption: https://docs.aws.amazon.com/kms/
- CloudTrail auditing: https://docs.aws.amazon.com/cloudtrail/