Scenario: AWS Enterprise File Transfer
Diagram convention: Arrows and messages are labeled 1, 2, 3… to show processing order. Each diagram is followed by a Step-by-step flow table explaining every numbered step.
Source: Interview framing from LinkedIn — Designing a Secure Enterprise File-Transfer Platform with AWS (Himanshu Bhadra).
Five pillars (interview + game day): Idempotency · Duplicates · Replay · DR switch · Back-of-envelope 1M/day
1. The Interview Question
"How would you design a secure enterprise file-transfer platform capable of processing up to one million files per day?"
Principal signal: Do not start by listing AWS services. Clarify requirements first—then defend architecture trade-offs.
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1 | Clarify | Partners, protocols, sizes, SLAs, DR, security—before any AWS list |
| 2–3 | Scope + Topology | Bound the problem, then draw ingress → storage → orchestration |
| 4–5 | Trade-offs + failures | Backpressure, idempotency, large files, poison messages |
| 6 | Evolve | Phased delivery that interviewers can probe |
2. Real-World Context
| Dimension | Detail |
|---|---|
| Company / system | Enterprise managed file transfer (MFT) / B2B exchange on AWS |
| Scale | Up to 1M files/day (~12 files/sec average; bursts much higher); mixed small EDI and multi-GB batches |
| Why architects care | Partner SLAs, compliance audit trails, idempotent delivery, multi-protocol ingress, and DR—not "upload to S3" |
| Deep chapter | Global File Transfer Platform |
| Public references | AWS Transfer Family; S3 event notifications; Step Functions orchestration |
Clarifying questions (ask before designing)
| Area | Questions |
|---|---|
| Topology | How many source/target systems? Internal only or external partners? |
| Protocols | SFTP, FTPS, AS2, HTTPS API, S3-compatible? |
| Payload | File-size ranges? Max object size? Compression / encryption in transit? |
| Timing | Real-time, scheduled windows, or event-driven? Peak hours? |
| DR | RTO / RPO? Multi-region required? |
| Correctness | Duplicate files? Partial transfers? Exactly-once business effect? |
| Security | Tenant isolation, PII, audit, retention, data residency? |
| Ops | Onboarding automation? Failed-transfer detection, retry, reconcile? |
3. Step-by-Step Interview Answer (STEP)
Practice aloud with the STEP framework.
S — Scope
| Decision | Choice |
|---|---|
| Throughput | 1M files/day sustained; design for 10× burst on partner windows |
| Durability | S3 as blob store (11 nines in-region); metadata in DynamoDB |
| Delivery | At-least-once with idempotent completion (checksum + transfer_id) |
| Security | Encryption in transit/at rest; per-tenant IAM / logical isolation |
| Out of scope (unless asked) | Full AS2 EDI mapping product; desktop sync client |
Step-by-step flow:
| Step | Choice | Why |
|---|---|---|
| 1 | In scope | Platform concerns: ingress, durability, orchestration, correctness, ops |
| 2 | Out of scope | Product surface area that distracts from architecture interview |
T — Topology (AWS reference architecture)
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–2 | Ingress | Transfer Family for managed SFTP; API Gateway for programmatic/HTTPS uploads |
| 3–4 | Persist blob | Land in S3 with SSE-KMS; never process only from ephemeral disk |
| 5–6 | Event | S3 → EventBridge → SQS for backpressure |
| 7–8 | Orchestrate | Step Functions + Lambda: schema/checksum, malware hook, routing rules |
| 9 | State | DynamoDB holds transfer_id, checksum, status, partner_id (idempotency) |
| 10 | Complete | Move/copy to processed prefix or push to target; mark SUCCEEDED once |
Happy-path sequence (whiteboard story)
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–2 | Upload + land | Blob hits durable S3 before any business processing |
| 3–5 | Decouple | Events + queue absorb partner upload bursts |
| 6–7 | Validate + claim | Checksum/scan then claim work with conditional write |
| 8–9 | Route or no-op | First writer delivers; duplicates return prior success |
| 10 | Close | Metrics for SLA dashboards |
Transfer lifecycle state machine
Step-by-step flow:
| Step | State transition | Explanation |
|---|---|---|
| 1–2 | RECEIVED → VALIDATING | Control plane owns status; blob stays in S3 |
| 3 | Branch | Fail closed to quarantine; never fail-open malware |
| 4–5 | Route / retry | At-least-once delivery with idempotent SUCCEEDED |
| 6–7 | Terminal | Quarantine needs humans; SUCCESS is durable |
E — Explore trade-offs (defend these)
| Topic | Strong stance |
|---|---|
| Scalability / backpressure | SQS + concurrency limits; never unbounded Lambda fan-out on 1M/day spikes |
| Large files | Multipart upload; resumable; process via S3-native jobs—not load entire object into Lambda memory |
| Idempotency | Key = partner + remote_name + checksum (or client transfer_id); DynamoDB conditional writes |
| Security / tenants | Separate IAM roles / prefixes per partner; KMS CMKs; Secrets Manager for credentials; VPC endpoints |
| Retry / replay | Step Functions retries + DLQ; operator replay from failed state without re-charging partners |
| Observability | Transfer state machine metrics; age-of-oldest-pending; partner SLA dashboards |
| Multi-region | CRR on critical buckets + active/passive control plane; document RPO/RTO |
| Cost vs complexity | Transfer Family + managed services beat DIY SFTP fleets for most enterprises |
Backpressure at peak (1M/day ≠ flat rate)
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–2 | Land + queue | Storage and SQS absorb spikes; partners are not gated on CPU |
| 3 | Concurrency caps | Protect downstream targets and Lambda memory |
| 4 | DLQ | Isolate poison files without stalling the queue |
Small vs large file paths
Step-by-step flow:
| Step | Path | Explanation |
|---|---|---|
| 1 | Size gate | Same control plane; different data plane |
| 2a / 3a | Small | Lambda OK for KB–MB EDI |
| 2b / 3b | Large | Never load GB into Lambda; stream or Step Functions + ECS/Batch |
| 4 | Complete | Both paths write the same idempotent SUCCEEDED record |
Idempotency key (duplicate same day)
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–2 | Claim | First writer owns delivery |
| 3–4 | Conflict | Second writer loses race safely |
| 5–6 | Deliver once | Business effect happens once |
| 7–8 | Safe ack | Duplicate upload does not double-route |
Tenant isolation & security plane
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–3 | Partner A path | Dedicated identity, prefix, and CMK |
| 4–6 | Partner B path | Same pattern; no shared write role |
| 7 | Isolation | Cross-prefix denied by IAM |
| 8–9 | Secrets | Credentials never in Lambda env plain text |
| Audit | CloudTrail / CW | Who uploaded what, when |
P — Production failure modes
| Failure | Detection | Mitigation |
|---|---|---|
| Partial SFTP upload | Incomplete multipart / size mismatch | Require checksum; quarantine incomplete |
| Duplicate file same day | Same idempotency key | Return prior success; no double-route |
| Virus / malware | Scanner hook fails open? | Fail closed to quarantine prefix |
| Partner cert expiry | Auth failures spike | Cert inventory + rotation runbook |
| Poison message | DLQ depth | Alert; manual replay tooling |
| Region outage | Health + R53 | Failover runbook; CRR lag as RPO floor |
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–2 | Classify | Success vs retryable vs security reject |
| 3–4 | DLQ + alert | Do not block healthy partners |
| 5–6 | Replay / review | Operator tools without re-billing partners |
Evolve — roadmap
| Phase | Deliverable |
|---|---|
| M1 | Transfer Family + S3 landing + DynamoDB state + basic validate |
| M2 | EventBridge/SQS/Step Functions; DLQ + replay UI |
| M3 | Tenant isolation, KMS, audit export for compliance |
| M4 | Multi-region DR drill; partner self-service onboarding |
| M5 | Cost dashboards; lifecycle tiering for cold files |
4. Back-of-envelope numbers (1M transfers/day)
Interviewers expect you to show the math, then design for peak, not average.
4.1 Throughput
| Assumption | Value | Math |
|---|---|---|
| Daily volume | 1,000,000 transfers/day | Given |
| Seconds/day | 86,400 | — |
| Average rate | ≈ 11.6 ≈ 12 transfers/s | 1e6 / 86400 |
| Partner window (common) | 4 hours overnight | 14,400 s |
| If 60% of volume in window | 600,000 / 14,400 | ≈ 42 transfers/s sustained in window |
| Burst (2× window rate) | Design target | ≈ 80–100 transfers/s |
| Extreme spike (retail EDI) | 10–20× average | 120–240 transfers/s for minutes |
Step-by-step flow:
| Step | Say in interview | Implication |
|---|---|---|
| 1 | “~12/s average is easy” | S3 + DDB on-demand handle this cold |
| 2 | “Real load is the SLA window” | Queues exist for a reason |
| 3 | “Design ~100/s ingest+validate” | Not 12/s |
| 4 | “Cap compute; let SQS absorb” | Protect downstream |
4.2 Object size mix (capacity drivers)
| Tier | Share (example) | Size | Bytes/day | Notes |
|---|---|---|---|---|
| Small EDI / XML | 70% = 700k | 50 KB avg | ~35 GB/day | Lambda OK |
| Medium | 25% = 250k | 5 MB avg | ~1.25 TB/day | Multipart; careful Lambda |
| Large batch | 5% = 50k | 500 MB avg | ~25 TB/day | ECS/Batch only |
| Total storage/day | ~26.3 TB/day landing | Before lifecycle |
Interview line: “Count files and bytes separately—1M tiny files stresses metadata/orchestration; GB files stress bandwidth and memory.”
4.3 Control-plane ops (DynamoDB / queues)
| Resource | Ops estimate | Capacity note |
|---|---|---|
| DDB writes / transfer | ~5–8 (create, claim, validate, route, succeed, audit) | 5–8M WRU/day ≈ 60–90 WRU/s avg; 400–800/s at peak |
| DDB reads | Status API + idempotency lookup | On-demand or provisioned with burst |
| SQS sends | 1–2 per transfer | ~12–100 msg/s — well under SQS limits |
| Step Functions starts | 1 per transfer (or batch Map) | Watch OpenExecution quota; raise limit |
| Lambda concurrent (validate) | rate × duration | e.g. 100/s × 2s = 200 concurrent → set reserved concurrency |
| S3 PUT | ≥1 per transfer (+ multipart parts) | Partition keys by partner/date |
4.4 Network & cost sketch (order of magnitude)
| Item | Rough math | Talk track |
|---|---|---|
| Ingress bandwidth (26 TB/day) | 26e12 B / 86400 ≈ ~2.4 Gbps average; window higher | Size Transfer Family / NLB accordingly |
| Cross-AZ / same-region | Prefer same-region land | Avoid surprise egress |
| DDB on-demand | Cents per million WRU at this scale | Metadata is cheap vs bytes |
| Lambda | 1M × 2s × 1GB ≈ 2M GB-s/day | Route large files off Lambda |
| S3 storage growth | 26 TB/day raw → lifecycle mandatory | IA / expire landing |
4.5 What to write on the whiteboard
1M/day → 12/s avg → design 100/s peak
Bytes: ~25–30 TB/day (mix matters)
DDB: ~5–8 writes/transfer → hundreds WRU/s peak
Lambda concurrency ≈ rate × p95 latency
SQS depth = shock absorber; DLQ = poison isolation
RPO = CRR lag; RTO = runbook clock (game day)
| Metric | Rough math |
|---|---|
| Average rate | 1e6 / 86400 ≈ 12 files/s |
| Peak design | ~80–100 files/s (window + headroom) |
| Metadata | 5–8M DDB writes/day — fine on-demand |
| Hot path risk | Lambda memory on large files — size gate |
| Backpressure | SQS depth + Step Functions / Lambda concurrency caps |
5. Multi-region DR sketch
Step-by-step flow:
| Step | Action | Explanation |
|---|---|---|
| 1–2 | Replicate data + control plane | Blobs and transfer status both matter |
| 3–5 | Failover | Workers follow DNS/flag; RPO = max(CRR lag, DDB lag) |
6. Whiteboard checklist
Draw five boxes left-to-right, then annotate failure paths underneath:
- Clarifying questions before AWS shopping list
- Ingress protocols called out
- Blob vs metadata separation (S3 + DynamoDB)
- Idempotency key defined
- Queue + DLQ for failure
- Security: KMS, IAM, Secrets, tenant isolation
- Observability: pending age, success/fail by partner
- DR: RPO/RTO one-liner
7. Principal-level signals
| Strong | Weak / red flag |
|---|---|
| Requirements first | "I'd use S3 and Lambda" immediately |
| Idempotency + checksum | Assume SFTP is exactly-once |
| Backpressure design | Unbounded fan-out |
| Tenant isolation + audit | Shared bucket, no KMS story |
| Large-file strategy | Load GB files into Lambda |
| Links to MFT depth | Treats as toy upload API |
8. Compact outline (2 minutes)
"I'd clarify partners, protocols, sizes, SLAs, and DR first. Then: Transfer Family/API ingress → S3 + KMS → EventBridge/SQS → Step Functions validate/route → DynamoDB idempotent state → CloudWatch. Defend backpressure, large files, duplicates, security, retries, and multi-region. 1M/day is easy on average; peaks and poison files are the real design."
9. Production HLD
9.1 C4 context
Step-by-step flow:
| Step | Interaction | Explanation |
|---|---|---|
| 1 | Partner → Platform | Multi-protocol ingress (Transfer Family, API) |
| 2 | Platform → S3 | Durable blob first; SSE-KMS |
| 3 | Workers | Checksum, malware hook, schema, route |
| 4 | Meta | Idempotency, status, partner config |
| 5 | Target | Processed prefix, partner egress, or event notify |
| 6–7 | Ops / Compliance | Game-day tools + immutable audit |
9.2 Full production stack
| Layer | AWS service | Purpose |
|---|---|---|
| SFTP ingress | AWS Transfer Family (SFTP) | Managed endpoints; custom IdP / Secrets Manager |
| HTTPS ingress | API Gateway + Lambda / ECS | Initiate transfer, presigned multipart, status API |
| Object store | S3 (versioned, SSE-KMS) | landing/, quarantine/, processed/, egress/ |
| Events | EventBridge | S3 ObjectCreated → rules by prefix/partner |
| Backpressure | SQS (+ DLQ) | Validate queue, route queue, egress queue |
| Orchestration | Step Functions | Durable workflow; retries; map for batches |
| Workers | Lambda (small) + ECS/Batch (large) | Size-gated processing |
| State | DynamoDB | Transfers, partners, idempotency, leases |
| Secrets | Secrets Manager | Partner SSH keys, egress passwords, API keys |
| Keys | KMS CMKs (per tenant or tier) | At-rest encryption; grant to workers |
| Scan | Lambda hook → GuardDuty Malware Protection / AV | Fail closed → quarantine |
| Notify | SNS / EventBridge | transfer.succeeded / transfer.failed |
| IaC | Terraform + CI/CD | Environments, partner onboarding modules |
| Obs | CloudWatch + X-Ray + CloudTrail | SLOs, forensics, audit |
| DR | S3 CRR + DynamoDB Global Tables (or PITR) | Regional failover |
9.3 Component interaction (production)
Step-by-step flow:
| Step | Path | Explanation |
|---|---|---|
| 1–2 | Ingress | SFTP or HTTPS lands object under partner prefix |
| 3–5 | Decouple | Event → queue → state machine (burst safe) |
| 6–7 | Branch | Valid → route queue; bad → quarantine + FAILED |
| Route | Deliver | Copy/compose to processed; emit events; SUCCEEDED once |
9.4 SLOs (interview + ops contract)
Illustrative targets for a production MFT platform. In an interview: define the SLI, show the math, name how you measure, then tie to the architecture that achieves it.
| SLO | Target (illustrative) | Notes |
|---|---|---|
| Availability (control plane) | 99.9% monthly | Status + initiate APIs |
| Time-to-validate p95 | < 2 min for files ≤ 100 MB | After ObjectCreated |
| Time-to-complete p95 | Within partner window W | Window defined per contract |
| Duplicate delivery rate | 0 business double-routes | Idempotency enforced |
| Poison isolation | DLQ depth alert < 15 min MTTA | Healthy partners unaffected |
| RPO (regional DR) | ≤ 15 min critical tier | S3 RTC + DDB lag |
| RTO (regional DR) | ≤ 60 min | Documented game day |
9.4.1 Availability 99.9% (control plane) — how calculated
What is in scope: POST /v1/transfers (initiate), GET /v1/transfers/{id} (status), auth to Transfer Family IdP health—not “every partner file finished.” Data-plane backlogs are latency/completeness SLOs, not this availability number.
SLI (say aloud):
[ \text{availability} = \frac{\text{successful requests}}{\text{successful} + \text{failed} + \text{timed-out}} ]
over a calendar month (exclude client 4xx except 429 from your infra; count 5xx and gateway timeouts as failed).
Error budget math (30-day month):
| Step | Calculation | Result |
|---|---|---|
| 1 | Allowed downtime fraction | (1 - 0.999 = 0.001) = 0.1% |
| 2 | Minutes in 30 days | (30 \times 24 \times 60 = 43{,}200) |
| 3 | Error budget | (43{,}200 \times 0.001 =) 43.2 minutes downtime/month |
| 4 | If multi-AZ API is up 99.95% | Budget left ≈ 21.6 min for deploys/incidents |
Interview line:
"99.9% monthly ≈ 43 minutes of allowed control-plane unavailability.
I burn that budget on incidents and risky deploys—not on silent 5xx."
How achieved (architecture):
| Lever | Why it hits 99.9% |
|---|---|
| Multi-AZ API Gateway / ECS / Lambda | AZ loss ≠ region outage |
| DynamoDB on-demand + multi-AZ | Status/idempotency reads stay up |
| Transfer Family multi-AZ endpoint | SFTP control path survives AZ |
| No single shared “upload pod disk” | Control plane doesn’t depend on local disk |
| Deploy with canary + rollback | Protects the 43-minute budget |
| Dependencies: fail soft on scan | Initiate/status still answer if AV is slow |
How measured: CloudWatch 4XX/5XX on API Gateway + custom success ratio; synthetic canary every 1 min (initiate dry-run or status of known transfer). Alert when burn rate would exhaust budget in < 2 days (multi-window burn).
9.4.2 Time-to-validate p95 < 2 minutes (≤ 100 MB) — how calculated
Definition: For each transfer with bytes ≤ 100 MB:
[ T_{\text{validate}} = t(\text{status} \in {\text{VALIDATED}, \text{QUARANTINED}, \text{FAILED}}) - t(\text{ObjectCreated}) ]
p95 = 95th percentile of (T_{\text{validate}}) over a rolling window (e.g. 1 hour or 1 day)—not the average.
Latency budget breakdown (must fit under 120 s at p95):
| Stage | Typical p95 budget | Notes |
|---|---|---|
| S3 → EventBridge → SQS | 1–5 s | Eventual; usually seconds |
| Queue wait | dominant under load | Cap with concurrency; alarm on depth |
| Lambda cold start (occasional) | 0.5–2 s | Provisioned concurrency for validate if needed |
| Download/hash ≤ 100 MB | 1–20 s | Same-region; ~50–100 MB/s effective OK |
| Malware scan hook | 5–30 s | Async or bounded; fail closed without blocking forever |
| DynamoDB upsert | < 50 ms | Negligible |
| Sum target | < 120 s | Leave headroom for queue wait |
Interview line:
"p95 < 2 min means 95 of 100 small files finish validate within 120s after land.
If average is 10s but p95 is 8 min, the queue is the problem—not Lambda code."
How achieved:
| Lever | Effect |
|---|---|
| EventBridge → SQS (not sync Lambda from S3) | Smooths bursts; protects p95 |
| Reserved concurrency on validate | Predictable drain rate |
| Size gate: ≤100 MB on Lambda path | Avoids OOM / multi-minute downloads |
| Same-region S3 + workers | No cross-region GET in hot path |
| Scan timeout + quarantine path | Bounded; doesn’t inflate success-path forever |
Alarm: validate_latency_ms p95 + ApproximateAgeOfOldestMessage | Catch budget burn early |
BOE check at 1M/day: avg ~12/s; design ~100/s peak. If each validate takes 5 s CPU, need ~500 concurrent workers at peak—set concurrency consciously so queue wait stays inside the 2-minute p95.
9.4.3 Time-to-complete p95 within partner window W — how calculated
Definition: Partner contract defines window (W) (example: “all files dropped by 02:00 UTC processed by 06:00 UTC” ⇒ (W = 4) hours).
[ T_{\text{complete}} = t(\text{SUCCEEDED} \lor \text{terminal FAILED}) - t(\text{RECEIVED}) ]
SLO: (P_{95}(T_{\text{complete}}) \le W) for transfers in that partner’s cohort (or: ≥95% of files in the batch complete before window end—same idea, batch framing).
Example math (say in interview):
| Input | Value |
|---|---|
| Nightly drop | 600,000 files between 22:00–02:00 |
| Window end | 06:00 ⇒ W = 4 h = 14,400 s after last drop (or from window start—clarify with partner) |
| p95 complete target | ≤ 14,400 s |
| Required average drain if backlog = 600k at 02:00 | (600{,}000 / 14{,}400 \approx) 42 files/s sustained |
Interview line:
"I don't promise 'fast'—I promise completion inside W. Capacity = peak backlog / W,
with headroom. 600k files / 4h ≈ 42/s—our §4 peak design of ~100/s covers that."
How achieved:
| Lever | Effect |
|---|---|
| SQS depth as buffer | Partners land at burst; workers drain at capped rate |
| Separate validate vs route queues | Slow egress doesn’t block validate SLO |
Autoscale on ApproximateNumberOfMessages + oldest age | Protect W |
| Partner-priority / weighted fair queues | One noisy partner doesn’t miss everyone’s W |
| Large-file ECS path | Big objects don’t stall small-file p95 |
Dashboard: % complete by window deadline | Business-facing SLI |
9.4.4 Duplicate delivery rate = 0 — how calculated
This is a safety SLO, not a latency percentile.
SLI:
[ \text{duplicate delivery rate} = \frac{\text{business effects with same idempotency key} - 1}{\text{unique idempotency keys succeeded}} ]
Target: 0 double-routes (exactly one transfer.succeeded side effect per key). Idempotent hits (second upload returns prior success) are good, not violations.
How you “calculate” in practice:
| Signal | Expected |
|---|---|
Metric idempotent_hit | Can be high (retries) |
Metric route_executed per idempotency_key | Must be 0 or 1 |
| Downstream unique constraint / counter | Game day: upload twice → target row count +1 |
Audit: two SUCCEEDED notifies same key | Page — SLO breach |
Interview line:
"Zero duplicate delivery means at-most-once business effect.
We measure 'routes per idempotency key ≤ 1', not 'zero partner retries'."
How achieved: DynamoDB conditional Put on idempotency key; CAS to SUCCEEDED before notify; SF execution name = hash(key); target writes idempotent; replay blocked when already SUCCEEDED (§10A.1–10A.3).
9.4.5 Poison isolation — DLQ alert MTTA < 15 min — how calculated
MTTA = Mean Time To Acknowledge (human or auto-ack of the incident), not MTTR.
SLI: For each period when DLQ_VisibleMessages > 0 (or depth exceeds threshold):
[ \text{time-to-ack} = t(\text{page acknowledged / IC claimed}) - t(\text{alarm firing}) ]
SLO: median or mean time-to-ack < 15 minutes (or: 95% of poison alarms acked within 15 min).
Why 15 minutes: Poison must not sit silently while operators sleep through a partner batch window; 15 min is an ops response target compatible with paging + runbook open.
Interview line:
"Isolation SLO isn't 'no poison files'—malware happens.
It's 'DLQ alarms page us and we acknowledge within 15 minutes,
while healthy partners keep draining on the main queue.'"
How achieved:
| Lever | Effect |
|---|---|
| Separate main queue vs DLQ | Bad messages don’t block good ones |
maxReceiveCount → DLQ | Automatic isolation after N failures |
| CloudWatch alarm on DLQ depth > 0 | Fast detect |
| PagerDuty / SNS → on-call | MTTA clock starts |
| Quarantine prefix for malware | Security path ≠ retry loop |
| Runbook GD-2 | Ack + triage without redrive to route |
9.4.6 RPO ≤ 15 min (critical tier) — how calculated
RPO = maximum acceptable data loss measured in time:
[ \text{RPO} = t_{\text{failover declare}} - t_{\text{last durable write that will be visible on DR}} ]
Practically: replication lag at failover time.
| Component | Lag signal | Critical-tier target |
|---|---|---|
| S3 objects | ReplicationLatency / RTC | ≤ 15 min for 99.99% of objects (S3 RTC promise) |
| DynamoDB state | Global Table replication lag | Typically seconds–low minutes; take max(S3, DDB) |
| Effective RPO | (\max(\text{S3 lag}, \text{DDB lag})) |
Interview line:
"RPO 15 minutes means if the region dies at 10:00, we may lose up to
15 minutes of not-yet-replicated lands/state. We buy S3 RTC on critical
prefixes and measure lag in game day—not hope."
How achieved: S3 CRR + Replication Time Control on critical landing/processed prefixes; DynamoDB Global Tables; alarm if ReplicationLatency > 900s; don’t claim RPO 0 without sync cross-region (usually too expensive).
9.4.7 RTO ≤ 60 min — how calculated
RTO = time from declare failover until service meets minimum viable SLOs on DR (canary SUCCEEDED + partners can connect).
| Phase | Budget (illustrative) | Clock contribution |
|---|---|---|
| Detect + confirm (dual signal) | 0–10 min | Alarms + AWS Health + IC |
Set failover_mode + active_region | 1–2 min | SSM / AppConfig |
| DNS / partner endpoint cutover | 5–15 min | TTL + Transfer Family DR warm |
| Scale workers to prod concurrency | 5–15 min | SF / ECS |
| Canary upload + status + reconcile sweep | 10–15 min | Prove correctness |
| Total target | ≤ 60 min | Sum of phases + buffer |
Interview line:
"RTO 60 minutes is a runbook clock, not a marketing slide.
We game-day GD-8 quarterly and publish actual T+ times.
Untested RTO is fiction."
How achieved: Warm/pilot Transfer Family in DR; SSM flags before DNS; CRR already warm; documented GD-8; synthetic canary; in-flight sweeper (S3 list + DDB)—see §10A.4.