0
0
DynamoDBquery~10 mins

On-demand vs provisioned cost comparison in DynamoDB - Visual Side-by-Side Comparison

Choose your learning style9 modes available
Concept Flow - On-demand vs provisioned cost comparison
Start
Choose Workload Type
On-demand Pricing
Calculate Cost
Compare Costs
Decision: Which is cheaper?
End
This flow shows how to compare costs by choosing workload type, calculating costs for on-demand and provisioned modes, then deciding which is cheaper.
Execution Sample
DynamoDB
SELECT workload_type, cost
FROM dynamodb_costs
WHERE workload_type IN ('on-demand', 'provisioned')
ORDER BY cost ASC;
This query retrieves and orders DynamoDB costs for on-demand and provisioned workloads to compare them.
Execution Table
StepWorkload TypeRead Capacity Units (RCU)Write Capacity Units (WCU)Requests per secondCost CalculationCost Result
1On-demandN/AN/A1000Cost = 1.8M req/hr * $0.25/M (read) + 1.8M req/hr * $1.25/M (write)$2.70
2Provisioned5005001000Cost = (RCU * $0.00013) + (WCU * $0.00065)$0.39
3Compare---Provisioned cheaper than On-demandChoose Provisioned
4End---Comparison complete-
💡 Comparison ends after calculating and comparing both costs.
Variable Tracker
VariableStartAfter Step 1After Step 2After Step 3Final
Workload TypeNoneOn-demandProvisionedProvisionedProvisioned
Cost0$2.70$0.39$0.39$0.39
Key Moments - 2 Insights
Why does On-demand cost more even with the same request rate?
On-demand charges per request without reserved capacity, so costs scale directly with usage (see execution_table row 1). Provisioned reserves capacity at a lower unit price (row 2).
What happens if request rate is lower than provisioned capacity?
Provisioned cost stays the same regardless of usage, so if requests are low, you pay for unused capacity (not shown in table but implied by provisioned pricing).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the cost result for On-demand pricing at step 1?
A$0.39
B$2.70
C$0.75
D$1.50
💡 Hint
Check the 'Cost Result' column in row 1 of execution_table.
At which step does the comparison decide which pricing is cheaper?
AStep 1
BStep 2
CStep 3
DStep 4
💡 Hint
Look for the row where costs are compared and a choice is made (execution_table row 3).
If the request rate doubles, which cost is likely to increase more?
AOn-demand cost
BProvisioned cost
CBoth increase equally
DNeither increases
💡 Hint
On-demand cost scales with requests (see execution_table row 1), provisioned cost is fixed by capacity.
Concept Snapshot
On-demand pricing charges per request, good for unpredictable workloads.
Provisioned pricing reserves capacity, cheaper for steady workloads.
Calculate costs by multiplying usage by unit prices.
Compare costs to choose the best option.
Provisioned cost is fixed; On-demand scales with usage.
Full Transcript
This visual execution compares DynamoDB On-demand and Provisioned pricing. First, we select the workload type. On-demand pricing charges per request, so cost scales with usage. Provisioned pricing reserves capacity at a fixed cost. We calculate costs for both using example rates: 1000 requests per second. On-demand cost is $2.70, provisioned cost is $0.39. Comparing costs shows provisioned is cheaper for steady high usage. Key points: On-demand is flexible but can be costly at scale; provisioned is cost-effective for predictable workloads. This helps decide which pricing model to use.