| Event ingestion |
API Gateway with ECS Fargate validators, batching 500 events per request |
Amazon Web Services |
Direct Kinesis PutRecords from producers; Lambda per request; a self-hosted collector |
Validation, deduplication and per-account quota need somewhere to live that is not the producer; batching is what makes replication inside the 50 ms accept budget affordable |
ADR-05 |
| Durable transport |
Kinesis Data Streams, partitioned on the account-to-bucket mapping |
Amazon Web Services |
MSK or self-managed Kafka; SQS; EventBridge |
Managed, ordered within a partition, and keyed identically to the ledger so stream skew and ledger skew are one problem; Kafka is more flexible and adds a stateful component on the revenue path |
ADR-12 |
| Event ledger |
S3 with Iceberg tables, partitioned by account bucket and period |
Amazon Web Services and open source |
Delta Lake; plain partitioned Parquet; a time-series database; a relational event table |
Eleven nines of durability, a table format that supports schema evolution and bounded scans, and lifecycle tiering to write-once cold storage — the exact properties ADR-01 and ADR-13 require |
ADR-01 |
| Audit tail |
Glacier with Object Lock, seven-year retention |
Amazon Web Services |
S3 Glacier Instant Retrieval; a third-party archive; tape |
Write-once retention the platform's own operators cannot shorten, at the price point a seven-year tail needs; retrieval cost and latency become a constraint on the dispute process and are stated as such |
ADR-13 |
| Deduplication index |
DynamoDB, conditional write, seven-day TTL |
Amazon Web Services |
Redis or ElastiCache; a Bloom filter; a Flink keyed state |
Durable, predictable single-digit-millisecond conditional writes at rate; a cache would make deduplication best-effort, which is not a guarantee this platform can offer |
ADR-04 |
| Event-time aggregation |
Amazon Managed Service for Apache Flink, checkpointing to S3 |
Amazon Web Services and open source |
Spark Structured Streaming; Kinesis Data Analytics SQL; a scheduled batch job over the ledger |
Event-time windows, watermarks, allowed lateness and exactly-once checkpointing are the hard part and are not worth rebuilding; a batch job over the ledger is the documented fallback and costs freshness |
ADR-06 |
| Aggregate store |
DynamoDB, keyed on account, meter, dimension hash and period |
Amazon Web Services |
Aurora; ElastiCache; a columnar store queried directly |
Write throughput and a partition key that matches the aggregation key; the aggregate store is derived and droppable, so durability guarantees beyond this would be paid for nothing |
ADR-03 |
| Financial ledger |
Aurora PostgreSQL, Multi-AZ, append-only by role |
Amazon Web Services |
DynamoDB; a double-entry ledger service; the ERP's own tables |
Invoices, balances and memos want transactions, constraints and joins; the append-only property is enforced by the database role the invoice service holds rather than by application discipline |
ADR-02 |
| Plan registry |
Aurora with each version also written to a versioned S3 object |
Amazon Web Services |
A Git repository with a deploy pipeline; AppConfig; DynamoDB |
Rating needs relational lookups by effective date; the immutable S3 copy means the configuration that priced an invoice exists outside the database that issued it |
ADR-08 |
| Entitlement decision |
ECS Fargate behind DAX, over the Aurora balance ledger |
Amazon Web Services |
ElastiCache; a local sidecar cache; DynamoDB with a Lambda authorizer |
The 10 ms p99 assumes a better-than-95% cache hit rate, and DAX gives that in front of the store that holds the authoritative balance; this figure is what decides whether synchronous caps are viable at all |
ADR-11 |
| Invoice and restatement runs |
Step Functions with ECS tasks, idempotent and resumable per account and period |
Amazon Web Services |
Airflow or MWAA; Batch; a cron-driven service |
Resumability and per-account parallelism are workflow properties rather than serving ones, and an interrupted run that must not double-issue is exactly what a durable state machine is for |
ADR-02 |
| Evidence query |
Athena over the Iceberg ledger, bounded by the aggregate's event range |
Amazon Web Services and open source |
Redshift Spectrum; EMR; a dedicated query service |
No cluster to keep warm for a workload measured in disputes per week, and a bounded scan over an ordered partition is what makes the 30-minute restatement target reachable |
ADR-03 |
| Downstream hand-off |
EventBridge as a durable replayable outbox |
Amazon Web Services |
SNS and SQS per consumer; direct API calls; a nightly file drop |
An invoice run must complete regardless of the payment platform's health, and consumers must receive the identical invoice on replay — which needs a durable outbox rather than a call |
ADR-02 |
| Identity and audit |
IAM roles with no overlapping trust policy, KMS per zone, CloudTrail plus an Object Lock prefix |
Amazon Web Services |
A third-party PAM product; application-level approvals; a self-hosted audit store |
Separation of the three privileged actions has to be enforced by the identity system rather than by application code, and the audit store has to be one the platform's operators can write but not delete |
ADR-15 |