EventBridge and SQS in one architecture
Use EventBridge to route events to interested targets and SQS to buffer work for a consumer that owns processing. They often belong together. Separate event publication, target delivery, message processing, and business completion so each failure has the right retry policy and recovery owner.
Inside this article 5 sections +
EventBridge and SQS solve different parts of an integration. EventBridge routes an event to interested targets. SQS holds messages until a consumer processes them. A subscription product can use both: publish a subscription change, route it to several capability-specific queues, and let each consumer manage its own backlog.
The architecture becomes unreliable when “event accepted,” “target received,” and “customer operation completed” are treated as the same fact. Separate those boundaries before deciding where retries, alarms, and dead-letter queues belong.
Map one subscription change through the system
Suppose a customer upgrades a plan. Billing records the change, provisioning adjusts access, and customer communication sends a confirmation. These consumers have different dependencies and recovery rules. A single routing event can initiate them without forcing one consumer's outage to block the others.
- Application transaction
- Commit the plan change and durable event intent.
- EventBridge
- Match the event contract and deliver to the configured capability targets.
- SQS queues
- Buffer provisioning and communication work under independent consumer policies.
- Consumers
- Apply authorized, duplicate-safe operations and record business outcomes.
Give the domain event a stable identifier created with the business intent. EventBridge also assigns identifiers to accepted events, but a producer retry can create another transport event for the same domain change. Consumers need the original business identity to recognize repeated publication.
Keep event data sufficient for the consumer's contract without copying unnecessary account data into every target. Include schema version, tenant scope, resource identity, and the relevant revision. If consumers fetch current state, define how that differs from processing the historical event's exact state.
Verify publication one entry at a time
A producer using PutEvents must inspect each entry's result. A batch request can contain both accepted and failed entries. Retry only the failed intents under the same domain identities, and preserve evidence for entries whose outcome is uncertain after a transport failure.
When the event follows a database mutation, use a durable publication mechanism such as an outbox so a crash does not leave the plan changed without its event. Marking an outbox row sent should follow the relevant acceptance evidence, not merely a local SDK call being queued.
Test the configured bus and rule matches with representative events. A valid event that matches no intended rule can be accepted by the bus while initiating no work. Publication success therefore needs a separate routing acceptance test and operational visibility into expected subscriptions.
Separate delivery failure from processing failure
EventBridge's retry policy applies to delivering an event to a target. The documented default allows retries for up to twenty-four hours and up to 185 attempts with backoff and jitter. Choose limits appropriate to the business deadline, and configure a target delivery DLQ where undelivered events need recovery.
If the target is an SQS queue and enqueue succeeds, EventBridge's delivery responsibility has completed. A later worker exception belongs to the SQS consumer's visibility, retry, and redrive policy. An EventBridge DLQ will not automatically collect every business processing failure.
| Failure | Evidence location | Recovery owner |
|---|---|---|
| Producer entry rejected | Publication ledger and per-entry result | Publishing application |
| Target cannot receive event | EventBridge delivery metrics and target DLQ | Routing/platform owner |
| Consumer cannot process message | SQS attempts, consumer logs, processing DLQ | Business capability team |
| External effect is uncertain | Durable operation and provider references | Reconciliation owner |
Verify permissions for both the target queue and the delivery DLQ. A misconfigured recovery destination can lose the very evidence intended to survive a delivery failure. Monitor failed attempts to send to the DLQ as well as messages that arrive successfully.
Treat rule changes like consumer-contract changes. Test events that should match, events from another tenant or source that should not match, and older schema versions still present in the publication backlog. A broad pattern can send work to an unintended capability, while a narrow pattern can silently omit a valid revision. Keep representative routing fixtures with the infrastructure definition.
Preserve idempotency, order, and capacity
Consumers should use stable event and operation identities to avoid repeating effects. A queue acknowledgement follows the consumer's durable result, but an external provider may still require reconciliation after a lost response. Routing retries and processing retries can both produce repeated observations of the same domain event.
Do not assume EventBridge provides business ordering. If provisioning revision two must not overwrite revision three, enforce revision-aware processing or choose an explicit ordered design. Sending events into a FIFO queue does not reconstruct source order that was already lost before enqueue.
Set consumer concurrency and rate limits around downstream capacity. Independent queues allow communication to pause while provisioning continues, but their shared provider or database budgets may still interact. Count replay and recovery traffic alongside ordinary traffic.
Replay only after checking current intent
A delayed plan-change event may be obsolete after another upgrade or cancellation. Decide whether the consumer applies every historical transition, converges to current state, or rejects stale revisions. That is a business contract, not a setting supplied by the event bus.
Run failure drills at publication, target delivery, consumer commit, and provider acceptance. The messaging guide frames the broader choice, and dead-letter operations makes recovery actionable. Integration architecture should let an operator identify exactly which boundary has not yet completed.