aws_ memorydb_ cluster cost estimation
A durable, Redis-compatible in-memory database. Priced per node-hour across all shards and replicas, plus per-GB data written and snapshot storage.
An aws_
The dominant cost is node-hours. Total nodes are num_
c3x reads node_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_memorydb_cluster" "main" {
name = "main"
node_type = "db.r6g.large"
num_shards = 2
num_replicas_per_shard = 1
acl_name = "open-access"
engine = "redis"
}Pricing dimensions
What you actually pay for when you provision aws_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Node hours | per node-hour | On-demand rate per node, billed across all nodes. Total = num_ $0.2163/hour for db.r7g.large (Valkey) |
| Data written | per GB | Data written to the durable multi-AZ transaction log. Unique to MemoryDB; no ElastiCache equivalent. Usage-based. $0.20/GB written |
| Snapshot storage | per GB-month | Backup storage beyond the free allowance equal to one cluster's size. Usage-based. |
Sample C3X output
Example output from c3x estimate (db.r6g.large, 2 shards x 2 nodes = 4):
aws_memorydb_cluster.main
└─ Nodes (db.r6g.large x 4) 2,920 node-hours $1,250.36
OVERALL TOTAL $1,250.36
(data-written & snapshots usage-based)Optimization tips
Common ways to reduce aws_ cost without changing the workload.
Use ElastiCache if you don't need durability
Premium + data-writtenMemoryDB's premium over ElastiCache buys the durable transaction log and data-written charge. If you're using it purely as a cache, aws_
Choose Valkey and Graviton nodes
~15%Valkey-engine nodes price slightly below Redis, and r7g Graviton beats r6g/r5 on price-performance. Combined, they trim the per-node rate meaningfully.
Right-size replicas
Per avoided replicaEach replica is a full-priced node. One replica per shard gives multi-AZ HA; a second is only for read scaling. Don't over-replicate.
FAQ
How does c3x estimate MemoryDB cost?
It multiplies num_
Why is MemoryDB more expensive than ElastiCache?
MemoryDB adds a durable multi-AZ transaction log so it can be a primary datastore. That durability raises the node rate and adds a per-GB data-written charge that ElastiCache doesn't have.
What is the data-written charge?
Every GB written to MemoryDB's durable log bills at roughly $0.20/GB. For write-heavy workloads this can be a significant line, so model it from expected write volume in c3x-usage.yml.
Does engine choice change the price?
Yes. Valkey-engine nodes are priced slightly lower than Redis for the same node type. c3x reads the engine attribute and applies the matching rate.
Can I reserve MemoryDB nodes?
Yes. Reserved nodes cut the rate for 1- or 3-year terms. Since MemoryDB clusters are steady-state datastores, they're good reservation candidates; model with purchaseOption in c3x-usage.yml.
Related resources
More AWS resources
Further reading
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_.