Skip to content

Series · 7 parts Published July 9, 2026

Mileage claim checker

A small system that takes mileage claims from a phone, checks each one against the route it says it drove and the trips already claimed that month, pays the ordinary ones straight through, and puts the odd ones in front of a person with the map already drawn. It never accuses anybody of anything. It asks a question with a number in it. Seven posts on the same system — one diagram at a time — with a cost breakdown and an engineering reference at the end.

  1. 01

    A mileage claim checker on AWS for a few dollars a month

    The whole system on one page — a claim intake, a distance check and a router — plus the rule that keeps it humane: it asks questions, it never accuses.

  2. 02

    How a mileage claim arrives

    One lane, on purpose: a phone form with three taps. How a site name becomes a routable address, what happens when it cannot, and the fingerprint that makes a resubmitted claim land on the original.

  3. 03

    How a mileage claim gets checked

    A wide band around the expected distance, a repeat test on the same trip, and a comparison against the claimant’s own months. The third never blocks a payment on its own, and the reason is the whole design.

  4. 04

    How a question reaches the claimant

    The claimant is asked first, not the manager. One message, both numbers, three buttons — return trip, detour, or a typo — and only silence escalates.

  5. 05

    How a mileage payment gets recorded

    What a paid claim leaves behind: an immutable record holding the numbers the decision was made against, a running monthly total per claimant, and a one-file payroll export.

  6. 06

    What the mileage claim checker costs

    About $4 a month. One Bedrock read per claim is the only line that grows; the queue, the table, the mail and the storage are rounding errors. Plus the three ways the bill could surprise you.

  7. 07

    Engineering reference: the mileage claim checker architecture

    Same system, drawn purely for engineers. Service names, region, Lambda inventory, IAM scopes, the schemas and the exact model id.

What is a mileage claim checker?
A small serverless system that takes mileage claims from field staff, works out the expected distance between the addresses claimed, compares it with what was claimed, checks the trip has not already been paid, and either approves it or asks the claimant one specific question. A person decides anything the checks flag.
Does it accuse people of fraud?
No, and the design goes out of its way not to. Almost every odd claim is a typo, a round-trip counted once, or a detour that really happened. The system asks a neutral question with the numbers in it — “this looks like 41 miles, you claimed 84; was this a return trip?” — and a yes closes it.
How does it know how far the trip should have been?
It calls a routing service once per claim with the two addresses and stores the answer. That distance is a reference, not a rule: a tolerance band around it is what decides whether a claim is ordinary. Roadworks, school runs and site diversions are exactly why the band is wide.
What stops the same trip being claimed twice?
Every claim gets a fingerprint from the claimant, the date, and the two addresses rounded to a small grid. The first write of that fingerprint wins by a conditional write, so a resubmitted claim lands on the original rather than becoming a second payment.
What does it cost to run?
A few dollars a month at small-business volume, plus whatever your routing provider charges per lookup. There is nothing always-on. See part six for the breakdown.
All posts