Technical
DynamoDB Cost Optimization Without Giving Up the Free Tier
The DynamoDB free tier covers far more than most blog posts admit. After eight months of running a real content platform on it, I can share the specific optimizations that kept my bill at zero dollars across tens of thousands of requests per month. Nothing exotic, just discipline.
The Three Knobs That Matter
On-demand versus provisioned. For unpredictable traffic patterns on small workloads, on-demand is cheaper and simpler. Provisioned is cheaper at steady high volume, which my side projects do not have. Set it once and forget it until you have a reason to reconsider.
Consistent reads. Eventually consistent reads cost half as much. Ninety percent of my queries do not need strong consistency. Checking for 'does this slug exist before publish' is the only place I pay for strong reads. Everything else uses the default.
Item size. Costs scale with kilobytes, not items. Storing full article bodies in the same item as metadata means every list query pulls the body. Splitting body to a separate item, or to S3, cuts list-query cost by 90 percent on a content-heavy workload.
The Split I Made
POSTS table:
PK=POST#<slug> SK=META -> small metadata item (1KB)
PK=POST#<slug> SK=BODY -> full article body (5-20KB)
List query scans only SK=META items. Detail view reads both.Before the split, a single list query cost 20 RCU. After the split, 1 RCU. Same user-facing behavior. Ten dollars a month saved at scale I have not hit yet. Free forever at my scale.
The Index Discipline
Every GSI is a second copy of the table for that key. Three GSIs means 4x the storage. I add a GSI only when no access pattern rewrite can satisfy the query. Usually the access pattern rewrite is cheaper. The DynamoDB single-table design guide from AWS is the best source on this tradeoff.
What I Do Not Do
Global tables. DAX. TTL-driven purge jobs. All of them are real tools for real problems I do not have. Each one is a maintenance cost. On a serverless content site, they are pure overhead.
The Free-Tier Math
25 GB storage, 25 WCU, 25 RCU at no charge. A blog with ten thousand posts at 10KB each is 100MB. A newsletter with 100k sends per month and 10 reads per send is 1M reads, which at 1 RCU per read is within the free tier. The free tier is not a starter plan; it is enough for real sites.
Cost discipline is free performance. Eight months of bills at zero dollars is the proof.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read