Usage Metering & Billing Pipeline  ·  View 07 of 22  ·  Structure

Platform Components

Five planes inside one account, and the named AWS services behind each.

Editable source SVG draw.io All views
AWS account — metering & billing platform Ingestion plane Ingest API API Gateway Validator ECS Fargate Dedup index DynamoDB, 7d TTL Quarantine S3 + reason Record plane Event stream Kinesis Data Streams Event ledger S3 Iceberg Audit tail Glacier, Object Lock Schema catalogue Glue Metering plane Aggregator Managed Flink Checkpoints S3 Aggregate store DynamoDB Money plane Rating service ECS Fargate Plan registry Aurora + S3 versions Entitlement service ECS + DAX Invoice run Step Functions Invoice ledger Aurora PostgreSQL Surfaces and recovery Usage & invoice API API Gateway Evidence query Athena Restatement run Step Functions Outbox EventBridge Product services Payment platform Tax engine ERP & revrec Privileged-action log events append aggregates invoice.issued replay cap decision Platform Components — Containers and Planes Interface / broker Application we own Data store Queue / topic External / third party Security / platform event / async synchronous batch Omitted for clarity: VPC endpoints, NAT, the bastion path and per-plane IAM roles — all present in view 16 and view 20. v 1.0 · owner Architecture Practice · date 2026-10

Decisions

  • Planes rather than microservices: the division is by what each group is allowed to be wrong about. The Record plane may never lose; the Metering plane may be rebuilt; the Money plane may be recomputed.
  • Managed Flink carries the aggregation because event-time windows, watermarks and exactly-once checkpointing are the hard part and are not worth rebuilding; the checkpoint store is explicit on the diagram because recovery depends on it.
  • Aurora PostgreSQL holds the financial ledger and DynamoDB the aggregates: the money side wants transactions and constraints, the metering side wants write throughput and a partition key.

Assumptions

  • Dedup index at 250,000 events/s with a 7-day TTL is affordable on DynamoDB with on-demand capacity (stated assumption, and the most likely cost surprise in the design).
  • Entitlement reads hit a DAX cache at better than 95%, which is what makes the 10 ms p99 reachable (stated assumption).

Omitted

  • VPC endpoints, NAT, subnet layout and per-plane IAM roles — present in views 16 and 20.
  • Two intra-plane edges were cut rather than routed around: Ingest API to stream, and rating to invoice ledger. Both are visible in views 09 and 13.