Skip to content
AWSAmazon ElastiCacheDatabase

aws_elasticache_cluster cost estimation

Managed Redis or Memcached. Priced per node-hour by instance type, with no storage or request charges.

An aws_elasticache_cluster is a managed in-memory cache running Redis or Memcached. Unlike S3 or DynamoDB, ElastiCache has no per-request or per-GB-month charges. You pay for the underlying compute nodes by the hour, period.

The cost model is identical to EC2: pick a node type (cache.t4g.micro through cache.r7g.16xlarge), pick a region, and pay the hourly rate times the number of nodes. A 3-node cache.m6g.large cluster in us-east-1 costs about 3 × $0.156/hour × 730 hours = $342/month.

Redis clusters have two replication modes. A non-cluster-mode cluster has one primary plus zero or more replicas (set via num_cache_nodes). A cluster-mode cluster shards data across multiple primary nodes, each with optional replicas (aws_elasticache_replication_group, not aws_elasticache_cluster). Pricing is the same per node either way; cluster mode just adds more nodes.

Memcached clusters always use multiple nodes for sharding. Each node is billed independently.

Reserved nodes (aws_elasticache_reserved_cache_node) cut prices by 30-60% for 1- or 3-year commitments. Useful for steady-state caches that you know you'll run continuously.

c3x reads node_type, num_cache_nodes, and engine from the Terraform configuration. Reserved pricing is applied via purchaseOption in c3x-usage.yml.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_elasticache_cluster" "session_cache" {
  cluster_id           = "session-cache"
  engine               = "redis"
  node_type            = "cache.m6g.large"
  num_cache_nodes      = 1
  parameter_group_name = "default.redis7"
  engine_version       = "7.1"
  port                 = 6379
}

Pricing dimensions

What you actually pay for when you provision aws_elasticache_cluster.

DimensionUnitWhat's being charged
Node hoursper node per hourHourly rate for the node type. Multiplied by num_cache_nodes for the total. c3x assumes 730 hours/month.
$0.156/hour for cache.m6g.large in us-east-1
Data transfer between AZsper GBCross-AZ replication traffic for Multi-AZ clusters. Usage-based.
Data transfer out to internetper GBEgress to the public internet. ElastiCache is typically accessed from EC2 in the same VPC (free).

Optimization tips

Common ways to reduce aws_elasticache_cluster cost without changing the workload.

Use Graviton (cache.m6g, cache.r6g) over Intel nodes

About 20%

Graviton ElastiCache nodes are roughly 20% cheaper than equivalent Intel nodes (m5, r5) with similar or better performance for Redis and Memcached workloads.

Buy reserved nodes for steady-state caches

30-45%

Caches rarely scale up and down. A 1-year all-upfront RI cuts on-demand cost by 30-45%. Model with purchaseOption: 'reserved' in c3x-usage.yml.

Consider ElastiCache Serverless for spiky workloads

Workload-dependent

Serverless bills by GB-hour of data stored and ECPU operations, not by node-hour. Cheaper for unpredictable or low-baseline workloads. Replaces provisioned clusters with cache.serverless.

Right-size the node type

30-50%

ElastiCache memory utilization is a CloudWatch metric (DatabaseMemoryUsagePercentage). Nodes running below 40% memory can usually drop a size. Check CloudWatch before resizing.

FAQ

Does c3x handle ElastiCache Serverless?

Yes. ElastiCache Serverless is a separate resource type with different pricing (per GB-hour stored, per ECPU). c3x detects the serverless config and uses the right pricing model.

Is Multi-AZ replication free?

The replica node itself costs the same hourly rate as the primary. Cross-AZ replication data transfer is billed per GB but typically small for Redis.

Does c3x estimate Redis storage?

ElastiCache doesn't bill by storage size. The node type defines the memory limit; you pay for the node regardless of how much memory you use. There's no separate storage line item.

What's the difference between aws_elasticache_cluster and aws_elasticache_replication_group?

aws_elasticache_cluster is for single-shard Redis or Memcached. aws_elasticache_replication_group is for Redis with multiple shards (cluster mode) or with explicit primary/replica topology. c3x estimates both, with replication_group being more common for production Redis.

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