ElastiCache vs MemoryDB cost: when durability is worth paying for
MemoryDB costs more than ElastiCache for the same node type and adds a per-GB data-written charge ElastiCache doesn't have. Here's the price difference, the durability you're buying, and when each is the right call.
Quick answer
MemoryDB costs more than ElastiCache for the same node type and adds a ~$0.20/GB data-written charge ElastiCache doesn't have. You're paying for a durable multi-AZ log that makes MemoryDB a primary datastore. If Redis is a cache in front of another database, ElastiCache is cheaper and correct. If Redis is your system of record, MemoryDB's premium buys the durability you'd otherwise build yourself.
Both run Redis-compatible in-memory workloads on AWS, and at a glance they look interchangeable. They are not, and the cost difference traces directly to one feature: durability.
The pricing difference
ElastiCache (cache)
- Node-hours by node type (e.g. cache.r6g.large ~$0.204/hour)
- Backup storage beyond one free snapshot per node
- No charge for writes
MemoryDB (durable datastore)
- Node-hours by node type, at a higher rate than the equivalent ElastiCache node
- Data written to the durable log: ~$0.20/GB
- Snapshot storage beyond the free allowance
Node count works the same for both: shards times (1 + replicas per shard). The divergence is the per-GB data-written charge, which is unique to MemoryDB and can be the larger line for write-heavy workloads.
What the premium buys
MemoryDB keeps a multi-AZ transaction log, so committed writes survive a node or zone failure. That lets it be the primary store for data you can't afford to lose, no separate database required. ElastiCache is an in-memory cache: fast, but if a node fails you rebuild from the source of truth. The price gap is the cost of not needing that source of truth.
When to choose which
- ElastiCache: Redis sits in front of a database (RDS, DynamoDB) and can be rebuilt on failure. Most caching use cases.
- MemoryDB: Redis is the system of record, session stores you can't lose, leaderboards, real-time state with durability needs.
See the real number before you decide
The data-written charge makes MemoryDB hard to estimate by intuition. Price both directly: aws_elasticache_replication_group and aws_memorydb_cluster both have full pricing breakdowns, and C3X estimates either from your Terraform with the write volume from a usage file.
# Compare both in one estimate
c3x estimate --path . --usage c3x-usage.ymlFor the broader caching picture, see DynamoDB on-demand vs provisioned for the durable-store alternative.
Pricing references
Related posts
- ElastiCache node sizing: paying for the right amount of memory
ElastiCache (Redis and Memcached) is priced per node by instance type, so node sizing and count drive the bill. Oversized memory, too many replicas, and the wrong node family are the common overspends. Here is how to size for cost.
- Provisioned IOPS for databases: when paying for I/O is worth it
io2 Block Express charges $0.065 per provisioned IOPS per month on top of storage. Provision 40,000 IOPS and you have added $2,600 to the monthly bill before a single byte is stored. Here is when that is the right call.
- Retry and idempotency cost: paying for the same work twice
Retries are free to configure and expensive to run. Duplicate processing multiplies compute, downstream calls, and side effects. Here is what retry policy really costs and how idempotency changes it.
- AWS ElastiCache Serverless cost: pay for data stored and compute used
ElastiCache Serverless bills per GB-hour of data stored and per ElastiCache Processing Unit (ECPU) consumed, scaling to your workload with no nodes to size. It suits spiky caches; steady ones can be cheaper on nodes. Here is how it prices.
Share this post
Try C3X on your own Terraform
Free and open source. No API key required. One command to install, one command to estimate.