AWS · Database
Amazon ElastiCache
Managed in-memory caching and data stores with Valkey, Redis OSS or Memcached, for microsecond reads and lighter database load.
What it is and what problem it solves
Amazon ElastiCache runs in-memory engines: Valkey, Redis OSS and Memcached. Applications use it to cache database query results, sessions and computed values, cutting latency to microseconds and offloading the database. Valkey and Redis OSS add data structures, replication with automatic failover, persistence and pub/sub; Memcached is a simple, multi-threaded cache.
Choose ElastiCache Serverless to skip capacity planning, or node-based clusters for control over node types, shards and replicas. Global Datastore replicates Valkey and Redis OSS across Regions.
When to use it
- Read-heavy applications where the same data is read often (product catalogues, profiles, leaderboards).
- Session storage for stateless web tiers.
- Rate limiting, queues and real-time counters using Valkey or Redis data structures.
When to avoid it
- As the only copy of important data (unless you use durable configurations and understand the trade-offs).
- Caching DynamoDB reads specifically: DAX is purpose-built for DynamoDB.
- Data that changes on every read, where caching adds complexity with little benefit.
Scaling model and bottlenecks
Serverless caches scale automatically. Node-based clusters scale out with more shards (cluster mode) and replicas, or up with larger nodes; Memcached scales out by adding nodes.
Performance, latency and throughput
In-memory access gives microsecond to sub-millisecond latency. Design the caching strategy: lazy loading (cache-aside) loads on misses; write-through updates the cache on writes; TTLs limit stale data.
Limits and quotas
| Item | Value | Context | Source |
|---|---|---|---|
| Engines | Valkey, Memcached and Redis OSS | Source checked |
|
| Nodes per shard (Valkey or Redis OSS) | 6 Fixed limit |
One primary and up to five read replicas. | Source checked |
| Nodes per cluster, cluster mode enabled | 90 Can be raised with a quota request |
Memcached: 60 nodes per cluster. | Source checked |
| Serverless caches per Region | 40 Can be raised with a quota request |
Source checked |
Quotas and limits change. Check the linked source before designing around a number.
Cost model
What you pay for
Serverless: data stored per GB-hour and ElastiCache Processing Units (ECPUs) per million. Node-based: node-hours by node type, On-Demand or reserved nodes for 1 or 3 years. Plus backup storage, Global Datastore cross-Region traffic and data transfer.
Where it is cost-efficient
Hot data with a high cache hit ratio, which lets you run a smaller database.
Where costs grow
Over-sized clusters, many replicas for little traffic, and caching data that is rarely read again.
Cost controls and common surprises
Monitor hit ratio and memory, set TTLs, use reserved nodes for steady clusters, and consider Valkey for lower prices where available.
Prices differ by Region and change over time; see the pricing page linked under Sources.
Security
Controls the service provides
VPC-only access with security groups, encryption in transit and at rest, and authentication (AUTH tokens or role-based access control with IAM for Valkey and Redis OSS).
What you configure
Enable encryption and authentication, keep caches in private subnets, and never cache sensitive data without the same protections as the source.
Logging and monitoring
CloudWatch metrics (hits, misses, evictions, memory), slow and engine logs, CloudTrail.
Related security services
KMS, IAM, VPC.
Shared responsibility
AWS manages nodes, patching and failover. You manage access, data and caching logic.
Availability, backup and failure behavior
Valkey and Redis OSS clusters with replicas in several Availability Zones fail over automatically. Memcached has no replication; losing a node loses its cache data.
Common service combinations
RDS, Aurora or DynamoDB behind the cache; session store for EC2 or containers; Global Datastore for multi-Region reads.
Business application examples
- A product page cache that serves most reads from Valkey and protects an Aurora database during sales.
- A gaming leaderboard built on sorted sets.
Exam cues and common confusions
- Reduce database read load, microsecond latency: ElastiCache.
- Replication, failover, persistence, data structures: Valkey or Redis OSS. Simple multi-threaded cache: Memcached.
- Cache for DynamoDB specifically: DAX.
- Session state for stateless web servers: ElastiCache (or DynamoDB).
Related
Courses and lessons
- Amazon ElastiCache and caching strategies · AWS Solutions Architect – Associate (SAA-C03) · Members
Services, comparisons and patterns
- Amazon RDS · Service
- Amazon Aurora · Service
- Amazon DynamoDB · Service
- RDS vs Aurora vs DynamoDB · Comparison
Sources
Independent study material, not affiliated with or endorsed by Amazon Web Services. AWS and service names are trademarks of Amazon.com, Inc. or its affiliates.