aws_dynamodb_table cost estimation
A managed NoSQL table. Pay-per-request (on-demand) or provisioned capacity, plus storage. No instances to manage.
An aws_dynamodb_table is a managed NoSQL key-value and document store. Pricing has two main modes that change the cost model entirely.
On-demand mode (billing_mode = "PAY_PER_REQUEST") bills per read and write request, with no upfront capacity to provision. Reads are roughly $0.25 per million; writes are $1.25 per million (5x higher). Right for unpredictable or low-baseline workloads.
Provisioned mode (billing_mode = "PROVISIONED") bills per provisioned RCU (read capacity unit) and WCU (write capacity unit) by the hour. One RCU = one strongly-consistent read of an item up to 4 KB; one WCU = one write of an item up to 1 KB. With auto-scaling, you set min/max capacity and DynamoDB adjusts within bounds. Right for predictable, high-volume workloads.
Both modes pay for storage at roughly $0.25/GB-month, after a 25 GB free tier.
On-demand vs provisioned crossover point: at sustained high traffic (say >25% utilization), provisioned with auto-scaling is cheaper. At low or spiky traffic, on-demand wins. The DynamoDB Reserved Capacity option for provisioned tables cuts WCU/RCU prices by 50-77% with a 1- or 3-year commitment.
c3x reads billing_mode and either provisioned capacity attributes or expected request volume from c3x-usage.yml (for on-demand).
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_dynamodb_table" "users" {
name = "users"
billing_mode = "PAY_PER_REQUEST"
hash_key = "user_id"
attribute {
name = "user_id"
type = "S"
}
point_in_time_recovery {
enabled = true
}
}Pricing dimensions
What you actually pay for when you provision aws_dynamodb_table.
| Dimension | Unit | What's being charged |
|---|---|---|
| On-demand reads | per 1M reads | Each read request unit handles one strongly-consistent read up to 4 KB. Eventually-consistent reads are half price. $0.25 per 1M read request units |
| On-demand writes | per 1M writes | Each write request unit handles one write up to 1 KB. $1.25 per 1M write request units |
| Provisioned WCU | per WCU-hour | Provisioned write capacity, billed continuously. $0.00065/WCU-hour ≈ $0.475/WCU-month |
| Provisioned RCU | per RCU-hour | Provisioned read capacity, billed continuously. $0.00013/RCU-hour ≈ $0.095/RCU-month |
| Storage | per GB-month | Table data plus indexes. First 25 GB free at the account level. $0.25/GB-month |
| Point-in-time recovery | per GB-month | Continuous backup if point_in_time_recovery is enabled. Adds to storage cost. |
| Global tables (replication) | per write replicated | Each write to a global table also writes to every replica region, doubling or tripling write costs. |
Optimization tips
Common ways to reduce aws_dynamodb_table cost without changing the workload.
Switch on-demand to provisioned + auto-scaling for steady workloads
30-70%If your table sustains >25% utilization, provisioned with auto-scaling (lower bound at p20, upper bound at p99) is significantly cheaper than on-demand. The break-even is workload-dependent but typical for production APIs.
Buy DynamoDB reserved capacity for predictable provisioned tables
50-77%1-year reserved capacity cuts on-demand WCU/RCU prices by 50%. 3-year cuts by 77%. Right for tables that will run continuously.
Use sparse indexes instead of GSIs you don't need
50% per dropped GSIEvery Global Secondary Index doubles your write costs (each write also writes to the GSI). Audit GSIs and drop those not actively queried.
Skip point-in-time recovery on non-critical tables
Storage cost / 2PITR adds ~$0.20/GB-month on top of base storage. For dev/staging or cache-style tables, regular on-demand backups are cheaper.
Use DynamoDB Streams + Lambda only when needed
Workload-dependentDynamoDB Streams adds per-read charges plus Lambda invocations. For pipelines that don't truly need event-driven writes, batch via scheduled Lambda or EventBridge instead.
FAQ
Why are my DynamoDB writes 5x more expensive than reads?
Writes consume more cluster resources than reads in DynamoDB's architecture, so AWS prices them at 5x. This is fundamental to the service. The mitigation is to batch writes (BatchWriteItem handles 25 writes for 25 WRUs) and avoid hot partition keys.
Does c3x estimate on-demand cost?
Only with c3x-usage.yml. On-demand is request-based, so c3x needs expected monthly_read_request_units and monthly_write_request_units. Without those, c3x shows the per-unit rate.
What about DynamoDB Accelerator (DAX)?
DAX is a separate resource (aws_dax_cluster) priced per node-hour like ElastiCache. c3x estimates it independently. It can cut DynamoDB read costs significantly for hot keys.
Are GSIs counted in storage cost?
Yes. Each GSI is a copy of the indexed attributes plus the partition key, so it adds storage. c3x estimates GSI storage as a percentage of base table storage based on the indexed attribute set.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_dynamodb_table.