Profile
Back to NewsBack
Dev.to 2 min
Reader Mode
Day 2/30 AWS System Design Patterns

Day 2/30 AWS System Design Patterns

21 hours ago

A fintech startup is building a real-time payment processing platform. Three teams need to react when a payment completes: the notifications team (send push + email), the fraud team (score the transaction), and the analytics team (write to the data warehouse for reporting and reconciliation — including re-processing historical events whenever finance restates a report).

The backend architect picks EventBridge (serverless event bus — rules are evaluated at publish time; an event that matches no enabled rule is discarded, not stored) for all three. Each team wires up a rule that triggers their Lambda (serverless compute). Three teams, three rules, one bus. Clean.

Six months later, the data warehouse goes down for a planned 4-hour migration on Sunday night. To stop their Lambda from throwing 14,000 errors against a dead warehouse, the analytics team disables their EventBridge rule for the window. Standard procedure. They re-enable it Monday at 6 AM.

14,000 payment events fire during those 4 hours. The fraud and notifications rules process every one of them. For the analytics rule, EventBridge evaluates each event, finds no enabled match, and moves on. No delivery is attempted. Nothing fails. Nothing is retried. Nothing is stored.

$1.4M in transactions are missing from the Monday reconciliation report. The audit team flags it by 9 AM.

The architect chose EventBridge for all three consumers. That was the mistake. What should the analytics team have been wired to instead?

A) Enable a DLQ (Dead Letter Queue — captures events EventBridge attempted to deliver to a target but could not) on the analytics rule — Sunday's 14,000 events would have been captured and re-driven after the maintenance window

B) Use SQS (message queue — buffers messages until a consumer processes and deletes them; each message is consumed once, then gone) as the rule target — the queue absorbs events while the pipeline is down, and the Lambda drains it on resume without disabling anything

C) Consume from a Kinesis Data Stream (streaming log — records are retained 24 hours to 7 days regardless of whether anyone reads them; each consumer owns its read position and resumes from it) — during maintenance the pipeline simply stops, then resumes from its last checkpoint and reads everything it missed

D) Enable EventBridge Archive + Replay (stores events published to the bus; an operator can later replay them, scoped to selected rules) — the archive retains Sunday's events and a Monday-morning replay re-delivers them to the analytics rule

Answer in the comments.

Chat with me
Menu