# AWS ElastiCache

> Amazon ElastiCache is a managed in-memory data store and cache compatible with Valkey, Redis OSS and Memcached, for microsecond latency.

- Source: https://www.itwonderlab.com/aws-elasticache/
- Published: 2026-10-05
- Updated: 2026-10-05
- Author: Javier Ruiz Jiménez (https://www.javierruizjimenez.com/)
- Site: IT Wonder Lab (https://www.itwonderlab.com/)

---

**Amazon ElastiCache** is a fully managed in-memory data store and cache. Keeping frequently read data in memory takes load off the database ([RDS](https://www.itwonderlab.com/aws-rds/), [DynamoDB](https://www.itwonderlab.com/aws-dynamodb/)) and answers in microseconds. It also serves as session store, rate limiter, queue, leaderboard and message broker.

### Engines

- **Valkey** and **Redis OSS**: data structures (strings, hashes, lists, sets, sorted sets), persistence, replication, automatic failover, pub/sub and Lua scripting.
- **Memcached**: a simple, multi-threaded key-value cache.

### Key concepts

- **Cluster** and **replication group**: a primary node with up to several replicas in different Availability Zones, and **cluster mode** to shard data across node groups.
- **Serverless** option that scales capacity automatically, or **node-based** clusters with the node type you choose.
- It runs in your [VPC](https://www.itwonderlab.com/aws-vpc/), in a **subnet group**, and is protected with [security groups](https://www.itwonderlab.com/aws-security-groups/): it is not reachable from the Internet.
- **Encryption** in transit (TLS) and at rest ([KMS](https://www.itwonderlab.com/aws-kms/)), authentication with passwords or [IAM](https://www.itwonderlab.com/aws-iam/).
- **Caching patterns**: *cache-aside* (lazy loading), *write-through* and TTLs to expire data.
- Metrics and alarms in [CloudWatch](https://www.itwonderlab.com/aws-cloudwatch/).

### Pricing

Node-based: per node hour. Serverless: per GB of data stored and per ElastiCache Processing Unit. See the [ElastiCache pricing](https://aws.amazon.com/elasticache/pricing/).

### With Terraform

The resources are `aws_elasticache_replication_group`, `aws_elasticache_cluster`, `aws_elasticache_serverless_cache`, `aws_elasticache_subnet_group` and `aws_elasticache_parameter_group`.
