Skip to content
Back to work
Case study

A freight network that settles in real time

Retired a fragile nightly batch for an event-driven settlement engine on DynamoDB Streams and EventBridge. Invoices that once took a day now clear in seconds.

Atlas Logistics2025Illustrative
  • Event-driven
  • DynamoDB
  • EventBridge
  • Step Functions
By the numbers
18h → 4s
Settlement time
−62%
Run-rate cost
0
Reconciliation breaks
how it's built
Settlement pipelineserverless · event-driven
Carrier feedsAPI Gateway
Domain eventsEventBridge
Ledger storeDynamoDB · single table
ProjectionsLambda consumers
SettlementStep Functions
InvoicesSES
PayoutsACH adapter
Latency
A load clears in about four seconds from the carrier ping — down from an overnight batch.
Consistency
Idempotent writes; every load projects into ledger entries exactly once, even on a replayed feed.
Resilience
A malformed feed quarantines one load through compensation paths — the rest of the network keeps settling.
Why serverless
Settlement is bursty and idle most of the day. Paying per event instead of for always-on capacity cut run-rate cost by roughly two-thirds.
Delivery & environmentsCI/CD
Sourcegit push
CIlint · typecheck · test
BuildCDK synth
DeployCDK deploy · CloudFormation
devstagingprod

Every environment is the same typed CDK app with a different context — adding a settlement lane is a config change, not a code change. Changes promote dev → staging → prod behind a manual approval, and a rollback is one deploy back.

01The problem

Atlas moved freight across three thousand carriers, but money moved once a night. A monolithic batch reconciled loads, tariffs, and fuel surcharges in a four-hour window — and when a single carrier feed arrived late or malformed, the whole run failed. Finance started its day not knowing what had settled, disputes piled up, and every new lane meant another hand-written branch in a job nobody wanted to touch.

02The approach

We modelled settlement as a stream of facts rather than a job. Every load event lands in a single DynamoDB table; a Streams consumer projects it into ledger entries and emits domain events onto EventBridge. Pricing, surcharge, and dispute logic became small, independently deployable Lambdas that subscribe to exactly the events they care about. A Step Functions workflow orchestrates the few genuinely sequential steps — invoice assembly and carrier payout — with explicit compensation paths, so a bad feed quarantines one load instead of halting the network. The whole thing is one CDK app with typed contracts shared end to end.

03The outcome

Settlement went from an overnight gamble to a continuous, observable flow. A load now clears in about four seconds from the carrier ping, finance watches it happen on a live board, and adding a lane is a config change rather than a code change. With no idle batch infrastructure, run-rate cost fell sixty-two percent — and in the first two quarters there was not a single reconciliation break.

05Start a project

Let’s write the next system into being

Tell us what you’re building. We’ll reply within two business days with a frank read on scope, shape, and whether we’re the right studio for it.