Series · 7 parts Published May 12, 2026

Contract summarizer

A serverless reader that takes a long contract and hands back a one-page plain-English summary — who, what, money, key dates, renewal and cancellation terms — and flags the clauses worth a closer look, like auto-renewal, penalties, and liability. It quotes the exact clause behind every point, never gives legal advice, and says when to call a lawyer. Seven posts on the same system — one diagram at a time — with an engineering reference at the end.

  1. 01

    A contract summarizer on AWS for a few dollars a month

    The whole system on one page — an intake, a reader, and a summary writer, plus the read → pull terms → flag risks flow they share for every contract.

  2. 02

    How a contract gets read

    Three lanes bring a contract in — a Drive folder you drop files into, an inbox-forwarding lane for PDFs, and a webhook from your e-sign tool. Then Textract turns the pages into text split into numbered clauses.

  3. 03

    How the key terms get pulled

    A Haiku model reads the clauses and fills a fixed shape: parties, deal, money, key dates, renewal and cancellation. Every field carries the clause number it came from, or it is left blank.

  4. 04

    How risky clauses get flagged

    A clause search finds the paragraphs that matter — auto-renewal, penalties, liability — and a Sonnet model explains each in plain words, says why it matters, and tells you when to call a lawyer.

  5. 05

    How a summary stays grounded

    Every point must quote the clause it came from, or it is dropped. The not-legal-advice banner, the escalate-to-a-human rule, and the one-tap approval before any summary is sent. Every step is logged.

  6. 06

    What the contract summarizer costs

    A few dollars a month at SMB volume. The system only runs when a contract arrives, and the cost is the read step plus two short model calls per contract.

  7. 07

    Engineering reference: the contract summarizer architecture

    Same system, drawn purely for engineers. Service names, resource identifiers, region, Bedrock model IDs, Lambda inventory, IAM scopes, the SES inbound rule set, the S3 Vectors index, and the DynamoDB schemas.

What is a contract summarizer?
A small serverless system that reads a long contract and hands back a one-page plain-English summary: who the parties are, what the deal is, the money, the key dates, and the renewal or cancellation terms. It also flags the clauses worth a closer look — auto-renewal, penalties, and liability — and quotes the exact clause it pulled each point from. It never gives legal advice; it points a busy owner at what matters and says when to call a lawyer.
How much does it cost to run?
About $3/month at typical small-business volume (around 40 contracts read a month). The fixed cost is essentially zero. The variable cost is dominated by the read step (Textract on the PDF) and the model calls that pull the terms and flag the risks. At 200 contracts a month the bill lands around $13.
Which AWS services does it use?
Lambda (Python 3.14, arm64) with a Function URL for the e-sign webhook and the approve button, S3 (with versioning), DynamoDB on-demand, EventBridge, SES inbound + outbound, Secrets Manager, CloudWatch Logs (7-day retention), AWS Budgets, and Bedrock — Claude Haiku 4.5 for the term pull and Claude Sonnet 4.6 for the risk read — via Global cross-Region inference, with Amazon Titan Text Embeddings V2 for the clause search. No API Gateway, no NAT Gateway, no always-on compute.
Where do the contracts and summaries live?
In an S3 bucket you control, with versioning on. The raw contract lands in one prefix; the cleaned text and the one-page summary land in another. A row in DynamoDB tracks each job — which contract, which version of the summary, who approved it, and when. The summary itself is also delivered to wherever you asked: a Drive folder, an email, or a Slack channel.
Does it use AI?
Yes, but in named places only. The read step uses no model — Textract pulls the text and a small Python pass splits it into numbered clauses. Then Bedrock Haiku 4.5 pulls the key terms into a fixed shape, and Bedrock Sonnet 4.6 reads the riskier clauses and explains them. Every point the model makes has to quote the clause it came from, or it is dropped. Titan embeddings power a clause search so the model is handed the right paragraphs, not the whole document.
Is the summary legal advice?
No, and the system is built so it can never pretend to be. Every summary carries a plain banner: this is a plain-English reading, not legal advice. The risk flags say what to look at and why, never what to do. When a clause is high-stakes — a personal guarantee, an unusual liability cap, an auto-renewal with a short notice window — the summary says so and tells the owner to run it past a lawyer before signing.
What does the one-page summary actually contain?
Six short blocks: the parties (who is signing with whom), the deal (what is being bought or sold), the money (price, payment terms, late fees), the key dates (start, end, renewal, notice windows), the renewal and cancellation terms (how it rolls over and how to get out), and the flagged clauses (the few worth a closer look, each with the quoted clause and a plain note on why it matters and whether to call a lawyer).
All posts