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_
On-demand mode (billing_
Provisioned mode (billing_
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_
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_.
| 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_ |
| 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_ 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_
What about DynamoDB Accelerator (DAX)?
DAX is a separate resource (aws_
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
More AWS resources
Further reading
- AWS AppSync cost: per query, per real-time message, per connection
AppSync bills GraphQL query and data-modification operations per million, real-time subscription messages per million, and connection-minutes. Chatty clients and broad subscriptions drive the bill. Here is how the managed-GraphQL pricing works.
- DynamoDB cost optimization: capacity mode, GSIs, TTL, and table class
DynamoDB cost is throughput + storage + GSIs + extras. Here's how to cut it: match capacity mode to traffic, prune unused indexes, set TTL, and use Standard-IA for cold tables.
- AWS DynamoDB global tables cost: you replicate writes and storage
Global tables replicate a DynamoDB table across regions, so you pay replicated write capacity, storage in every region, and cross-region replication transfer. The multiplier is the number of regions. Here is when multi-region is worth it.
- AWS Keyspaces cost: serverless Cassandra billed per request and GB
Keyspaces (managed Cassandra) bills read and write request units, storage per GB-month, and optional features, with on-demand and provisioned capacity modes. It scales to zero with no clusters to manage. Here is how it prices versus self-managed Cassandra.
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_.