AWS Solutions Architect Handbook SAA-C03, from zero Bipin Singh
Databases

Caching and purpose-built databases

2 min readChapter 30 of 48By Bipin Singh

AWS's philosophy is purpose-built databases: use the database designed for each access pattern instead of forcing everything into one engine. Caching sits in front of all of them to make reads fast and cheap.

Amazon ElastiCache

Managed in-memory data stores: Redis OSS / Valkey and Memcached.

Redis OSS / Valkey Memcached
Data structures Rich (lists, sets, sorted sets, hashes, streams) Simple key-value
Persistence and backups Yes No
Replication, Multi-AZ failover Yes No
Pub/sub, leaderboards, geospatial Yes No
Multi-threaded scaling Cluster mode (sharding) Yes, simple horizontal scaling
Pick when Most cases: sessions, leaderboards, HA caches Simple, ephemeral object caching

ElastiCache also offers a serverless option that scales automatically. Amazon MemoryDB is a Redis/Valkey-compatible durable in-memory primary database (not just a cache).

Caching strategies

Strategy How Trade-off
Lazy loading (cache-aside) Read cache; on a miss, read DB and populate cache Only requested data cached; first read slow; can be stale
Write-through Write to cache whenever writing to DB Cache always fresh; caches data that may never be read
TTL Expire entries after a time Balances freshness and hit rate — use with both
Key idea

"Reduce database load for repeated reads" or "store user sessions for a stateless fleet" → ElastiCache. For DynamoDB specifically → DAX.

Other caching layers

Purpose-built databases

Service Type Use cases
Amazon DocumentDB Document (MongoDB-compatible) Content management, catalogues, user profiles — "MongoDB workloads on a managed service"
Amazon Neptune Graph Social networks, fraud detection, recommendations, knowledge graphs — "relationships between entities"
Amazon Keyspaces Wide-column (Cassandra-compatible), serverless "Migrate Apache Cassandra without managing servers"
Amazon Timestream Time series IoT sensor data, DevOps metrics, industrial telemetry
Amazon Redshift Data warehouse (columnar, massively parallel) Analytics and BI over large structured datasets (see analytics)
Amazon OpenSearch Service Search and log analytics Full-text search, log analytics, observability
Amazon MemoryDB Durable in-memory Ultra-fast primary database
Amazon QLDB Ledger (immutable, verifiable history) Listed in the exam guide, but AWS has ended support for QLDB — know it as "cryptographically verifiable transaction log"; modern alternatives include Aurora PostgreSQL with audit tables

Exam patterns

Bipin Singh
Written by Bipin Singh

Senior Full-Stack Engineer · AI & AWS. I design and run production systems on AWS — serverless, data and AI.

Work with me