What the recurring invoice generator costs
A billing system that costs more than the time it saves is a bad joke. This post is the cost breakdown: every AWS service this generator touches, what each one adds up to at around 120 invoices a month, why the total lands near $2.00 — and why the one line worth naming is the one that bills while the system sleeps.
Key takeaways
- About $2.00/month at roughly 120 invoices, and the fixed cost is essentially zero — nothing runs between billing cycles.
- The single largest line is Secrets Manager, at $0.40 per secret per month for the Drive and signing keys.
- The work that builds, prorates, taxes, and renders each invoice is plain Python on Lambda and rounds to cents.
- Bedrock is optional and small — it only polishes some descriptions, so the model line is a fraction of the bill, or zero if switched off.
- At ten times the volume (around 1,200 invoices) the bill lands near $7 — it scales with use, not with idle time.
Where the money goes
The generator is serverless end to end, so there’s no instance ticking over between billing runs and no idle bill. You pay for an invoice only when a schedule fires. At a typical small-business volume — call it 120 invoices a month across the contracts you bill — here’s the whole bill, line by line.
| AWS service | What it does here | Monthly |
|---|---|---|
| Secrets Manager | Two secrets — Drive service-account key, view-link signing key ($0.40 each) | $0.80 |
| S3 (versioned) | Every rendered invoice PDF, kept as sent | $0.25 |
| DynamoDB (on-demand) | Contracts mirror, invoice ledger, number counter — small reads and writes | $0.20 |
| CloudWatch Logs | Function logs, 7-day retention | $0.20 |
| Bedrock (Claude Haiku 4.5) | Optional description polish on a fraction of lines | $0.15 |
| Lambda (Python 3.14, arm64) | Builder, render, send, sweep, drive-sync | $0.15 |
| SES | Emailing each invoice PDF to the customer | $0.15 |
| EventBridge Scheduler | Per-contract billing cycles and the daily sweep | $0.05 |
| SQS + DLQ | Buffering between stages, and the overdue hand-off queue | $0.05 |
| AWS Budgets | Cost alarm (first two budgets are free) | $0.00 |
| Total | ~120 invoices/month | $2.00 |
The shape of that bill is the point. The single biggest line isn’t any of the work — it’s Secrets Manager, a flat fee for holding two keys safely, which you’d pay whether you issued one invoice or a thousand. Everything that actually produces an invoice — building it, prorating it, applying tax, rendering the PDF — is plain Python on Lambda and a few small reads and writes, and it all rounds to cents. Even Bedrock, the one place a model could run, is optional and tiny here, because it only ever tidies up a description on the contracts that ask for it.
The one real fixed cost
It’s worth dwelling on Secrets Manager, because it’s the only thing here that costs money while the system sleeps. Two secrets at $0.40 each is $0.80 a month no matter what — nearly half the bill at this volume — and it buys you the Drive service-account key (so the contract sync can read your sheet) and the signing key (so each invoice’s view link can’t be forged or guessed). If you didn’t need the view links you’d shave $0.40 off; everything else on the list is genuinely usage-priced and rounds to zero at idle, which is exactly what you want from a system that only does work when an invoice is due.
What ten times the volume costs
Push this to a busier book — 1,200 invoices a month, ten times the volume — and the bill lands near $7, not $20. It’s sub-linear because the fixed lines don’t move: Secrets Manager stays at $0.80, the schedules barely change (a per-contract entry firing monthly is a rounding error either way), and AWS Budgets stays free. What scales is the genuinely usage-priced work — more Lambda invocations, more SES sends, more PDFs in S3, a little more Bedrock if you use it — and even at ten times the invoices, the per-invoice work is so cheap that the total is still dominated by that flat secrets fee. Turn Bedrock off and you’d save its line entirely; the invoices would just carry the contract’s raw descriptions.
The honest way to read this: the AWS bill is rounding error against the alternative. A person preparing 120 invoices a month by hand — checking each contract, doing the proration, getting the VAT right, rendering and sending — is a steady chunk of someone’s week, and the work is exactly the kind that’s easy to get subtly wrong when it’s dull. $2.00, or even $7, buys that time back and removes the late invoice, the stale price, and the un-prorated upgrade as failure modes — while keeping a perfect record of every figure.
Design rules that shaped the cost
- Pay per invoice, not per hour. No always-on compute means no idle bill between cycles.
- Keep the work in plain code. Building, prorating, taxing, and rendering are Lambda and a few small reads — cents.
- Render in-process. An HTML-to-PDF step inside Lambda avoids a paid rendering service entirely.
- Know your one fixed cost. Secrets Manager is the only line that bills while the system sleeps.
- The model is optional. Bedrock only polishes wording; switch it off and the line disappears.