0
0
DynamoDBquery~3 mins

On-demand vs provisioned cost comparison in DynamoDB - When to Use Which

Choose your learning style9 modes available
The Big Idea

What if your database could pay only for what it actually uses, no more, no less?

The Scenario

Imagine running a small online store and trying to guess how many customers will visit each day. You decide to prepare a fixed number of checkout counters (servers) to handle the rush. Sometimes, many customers wait in long lines; other times, counters sit idle.

The Problem

Manually guessing traffic means you either waste money paying for unused capacity or frustrate customers with slow service during busy times. Adjusting capacity constantly is tiring and error-prone.

The Solution

With on-demand and provisioned capacity modes, DynamoDB lets you choose how to pay for database usage. On-demand automatically adjusts to traffic, charging only for what you use. Provisioned lets you set capacity ahead, saving money if traffic is steady and predictable.

Before vs After
Before
Set fixed capacity: 100 reads/sec, 50 writes/sec
Pay for all even if unused
After
Use on-demand mode
Pay only for actual reads and writes
Or provision capacity based on expected load
What It Enables

You can optimize costs and performance by matching your database capacity to real user demand without guesswork.

Real Life Example

A mobile app with unpredictable user spikes uses on-demand mode to handle sudden traffic without downtime or overspending.

Key Takeaways

Manual capacity planning wastes money or causes slowdowns.

On-demand mode charges per actual use, perfect for variable traffic.

Provisioned mode saves cost when traffic is steady and predictable.