aws_dynamodb_table_item cost estimation
A DynamoDB table item is free to define, but it adds to the table's stored data and consumes write and read capacity, so its cost is realized on the table.
An aws_dynamodb_table_item writes a single item into a DynamoDB table through Terraform. The resource has no separate charge, but the item is not free the way a pure blueprint is: it occupies storage in the table and the write that creates it consumes capacity. The cost is realized on the aws_dynamodb_table, which is where DynamoDB meters storage, reads, and writes.
DynamoDB bills storage per GB-month (about $0.25/GB-month) for all item data plus index overhead, and bills throughput either on-demand (per million read and write request units) or provisioned (per capacity unit-hour). Writing one item with Terraform consumes write capacity once; reading it consumes read capacity. A handful of seed items is negligible, but managing many items this way, or large items, adds real stored bytes and, on write, real capacity consumption.
aws_dynamodb_table_item is meant for seeding a few reference or configuration rows, not for bulk data, and Terraform does not track drift on the item's non-key attributes. The table's own storage and throughput settings dominate the bill. c3x prices the table by its capacity mode and estimated storage, and treats each managed item as data that adds to that table total rather than as a free resource.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_dynamodb_table_item" "default_config" {
table_name = aws_dynamodb_table.settings.name
hash_key = aws_dynamodb_table.settings.hash_key
item = jsonencode({
id = { S = "app-config" }
theme = { S = "dark" }
limit = { N = "100" }
})
}Pricing dimensions
What you actually pay for when you provision aws_dynamodb_table_item.
| Dimension | Unit | What's being charged |
|---|---|---|
| Item storage | per GB-month | The item's bytes add to the table's stored data, billed per GB-month. ~$0.25/GB-month |
| Write to create the item | per write request unit | Writing the item consumes write capacity once, on-demand or provisioned. On-demand: ~$1.25 per 1M writes |
| Reads of the item | per read request unit | Reading the item consumes read capacity on the table. On-demand: ~$0.25 per 1M reads |
Optimization tips
Common ways to reduce aws_dynamodb_table_item cost without changing the workload.
Use table items only for seed data
aws_dynamodb_table_item suits a few reference or config rows. For bulk loads use a batch import or application writes, which are cheaper to run and do not bloat Terraform state.
Keep items small
Storage and write capacity both scale with item size. Trim large attributes and store big blobs in S3 with a pointer in the item instead of inline.
Match the table's capacity mode to access
The real cost is the table. On-demand suits spiky or seed workloads; provisioned with auto scaling is cheaper for steady traffic. Pick the mode that fits how items are actually read and written.
FAQ
Does a DynamoDB table item cost money?
Indirectly. The item is not a billed resource on its own, but it adds bytes to the table's storage (per GB-month) and the write that creates it consumes write capacity. Cost is realized on the table.
Should I load bulk data with aws_dynamodb_table_item?
No. It is designed for seeding a few reference or configuration rows. Bulk data belongs in a batch import or application writes, which are cheaper and do not bloat Terraform state with every row.
How do I estimate the cost of DynamoDB items?
Sum the item sizes for storage per GB-month, then account for the read and write capacity your access pattern consumes under the table's capacity mode. c3x prices this at the table level.
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_item.