AWSAmazon ElastiCacheDatabase

aws_elasticache_replication_group cost estimation

A Redis (or Valkey) replication group with primary and replica nodes, optionally cluster-mode sharded. Priced per node-hour by node type across all shards and replicas.

An aws_elasticache_replication_group is how you run highly available Redis on ElastiCache. Unlike a single aws_elasticache_cluster node, a replication group has a primary and one or more replicas, and in cluster mode it shards data across multiple node groups. Every node in the group bills at the same per-hour rate for its node type, so the total is the node rate times the node count.

Node count is the thing people get wrong when estimating. In cluster mode, the total is num_node_groups (shards) multiplied by (1 primary + replicas_per_node_group). A 3-shard group with 1 replica each is 6 nodes, not 3. c3x reads num_node_groups and replicas_per_node_group (or the older number_cache_clusters for non-cluster mode) and multiplies correctly.

The node rate depends on the node type family. The r6g and r7g (Graviton) families give the best price-performance for memory-heavy Redis workloads; the t4g family is cheapest for small or bursty caches. c3x prices the on-demand node rate at 730 hours/month. Backup storage beyond one free snapshot per node is a usage-based dimension modelled separately.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_elasticache_replication_group" "sessions" {
  replication_group_id = "sessions"
  description          = "Session store"
  node_type            = "cache.r6g.large"
  engine               = "redis"

  num_node_groups         = 3
  replicas_per_node_group = 1

  automatic_failover_enabled = true
  multi_az_enabled           = true
}

Pricing dimensions

What you actually pay for when you provision aws_elasticache_replication_group.

DimensionUnitWhat's being charged
Cache node hoursper node-hourOn-demand rate for the node type, billed for every node in the group. Total nodes = num_node_groups x (1 + replicas_per_node_group). c3x assumes 730 hours/month.
$0.204/hour for cache.r6g.large in us-east-1
Backup storageper GB-monthEach node includes one free snapshot. Storage beyond that bills per GB-month. Usage-based; set snapshot retention and size in c3x-usage.yml.
$0.085/GB-month
Data transfer (cross-AZ)per GBReplication traffic between AZs in a Multi-AZ group can incur cross-AZ transfer charges. Usage-based.

Sample C3X output

Example output from c3x estimate for the Terraform above (6 nodes):

aws_elasticache_replication_group.sessions
└─ Cache nodes (cache.r6g.large x 6)   4,380  node-hours    $893.52

OVERALL TOTAL                                             $893.52

Optimization tips

Common ways to reduce aws_elasticache_replication_group cost without changing the workload.

Use Graviton (r7g/r6g) over Intel (r5/r6)

10-20%

Graviton node families deliver better price-performance for Redis at a lower hourly rate than the equivalent Intel family. For most workloads r7g is a strict upgrade over r5.

Right-size replica count

Up to 33%

Each replica is a full node at full price. Two replicas per shard doubles the replica cost; one is usually enough for HA. Only add a second replica if you need read scaling or extra failover headroom.

Buy reserved nodes for steady caches

30-50%

ElastiCache reserved nodes cut the rate ~30-50% for a 1- or 3-year term. Caches are almost always steady-state, making them ideal reservation candidates.

Consider ElastiCache Serverless for spiky traffic

Workload-dependent

If your cache load is bursty, aws_elasticache_serverless_cache bills by data stored and ECPUs consumed rather than always-on nodes, which can be cheaper below ~70% utilization.

FAQ

How does c3x count nodes in a replication group?

For cluster mode it multiplies num_node_groups (shards) by (1 + replicas_per_node_group). For non-cluster mode it uses number_cache_clusters. It then prices every node at the on-demand rate for the node_type, 730 hours/month.

Does engine choice (Redis vs Valkey) change the price?

Valkey nodes are priced slightly lower than Redis for the same node type. c3x reads the engine attribute and applies the corresponding rate.

How is this different from aws_elasticache_cluster?

aws_elasticache_cluster is a single Memcached or single-node Redis deployment. A replication group adds replicas and optional sharding for HA and scale, so it has more nodes and a higher total cost.

Are backups included in the estimate?

One snapshot per node is free and not charged. Additional backup storage is usage-based; supply snapshot_retention_limit and expected size in c3x-usage.yml to include it.

Can c3x model reserved ElastiCache nodes?

Yes. Set purchaseOption to reserved with the term and offering in c3x-usage.yml and c3x applies the discounted node rate.

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_elasticache_replication_group.