Volume 5 · Chapter 12 — Storage and Databases

Purpose-Built Databases and Caching in Depth

Goutham Mayaluri 4 min read AWSCloudStorageDatabases

12.1 Introduction

AWS’s “right tool for the job” philosophy means many purpose-built databases, and the exam tests recognizing which to use. Beyond relational and DynamoDB, this chapter covers ElastiCache (Redis vs Memcached) and MemoryDB, the data warehouse (Redshift), and the specialized engines (Neptune, DocumentDB, Keyspaces, Timestream, QLDB) - so you can match a data model to the right service.

12.2 ElastiCache: Redis vs Memcached, and MemoryDB

ElastiCacheis managed in-memory caching in two engines.Redisis feature-rich - it supports persistence, replication and Multi-AZ failover, backups, pub/sub, sorted sets and rich data structures, and clustering - use it when you need high availability, persistence, or advanced structures (leaderboards, sessions with failover).Memcachedis simpler - pure multi-threaded caching, easily scaled horizontally, no persistence or failover - use it for a simple, large, scale-out cache.MemoryDB for Redisis adurablein-memory database (Redis-compatible) with multi-AZ durability, usable as a primary database for ultra-fast access, not just a cache. The exam pattern: Redis for HA/ persistence/advanced features, Memcached for simple scale-out caching, MemoryDB when you need in-memory speed as a durable primary store. (And recall DAX for DynamoDB-specific caching.)

flowchart TD
  Q{Data model / need?} -->|Relational + ACID| RDS[RDS / Aurora]
  Q -->|Key-value / document, massive scale| DDB[DynamoDB]
  Q -->|In-memory cache, HA/persistence| Redis[ElastiCache Redis]
  Q -->|Simple scale-out cache| MC[ElastiCache Memcached]
  Q -->|Analytics / data warehouse| RS[Redshift]
  Q -->|Graph / relationships| Nep[Neptune]
  Q -->|MongoDB-compatible document| Doc[DocumentDB]
  Q -->|Wide-column Cassandra| Key[Keyspaces]
  Q -->|Time-series| TS[Timestream]
  Q -->|Immutable ledger| QLDB[QLDB]

12.3 Redshift: The Data Warehouse

Amazon Redshiftis a petabyte-scale columnar data warehouse forOLAP(analytics) - complex aggregations over huge datasets - as opposed to OLTP (transactional) databases like RDS. It uses columnar storage and massively parallel processing across nodes.Redshift Spectrumqueries data directly in S3 without loading it, andRedshift Serverlessruns without managing clusters. The exam distinction: use Redshift for data-warehousing/BI analytics over large structured datasets; don’t use it for transactional workloads (that’s RDS/Aurora) or ad-hoc S3 querying without a warehouse (that’s Athena). Redshift is the answer whenever “data warehouse” or “complex analytical queries at scale” appears.

12.4 The Specialized Engines

AWS offers a purpose-built database per data model, and the exam tests matching them.Neptuneis a graph database for highly-connected data and relationship queries (social networks, fraud rings, recommendation graphs).DocumentDBis a managed MongoDB-compatible document database.Keyspacesis managed Apache Cassandra (wide-column).Timestreamis a time-series database for IoT/metrics data with time-based queries and retention.**QLDB (Quantum Ledger Database)**is an immutable, cryptographically-verifiable ledger with a complete, tamper-evident history - for systems of record needing a verifiable audit trail (though its “central trusted authority” model differs from a blockchain). The exam mnemonic: graph → Neptune, MongoDB → DocumentDB, Cassandra → Keyspaces, time-series → Timestream, immutable verifiable ledger → QLDB.

12.5 Data Migration: DMS and SCT

Moving databases to AWS is served by two services.**AWS Database Migration Service (DMS)migrates databases with minimal downtime - it replicates data (one-time or continuously via change data capture) from a source to a target, including keeping them in sync during a cutover, and supports homogeneous (same engine) and heterogeneous migrations. TheSchema Conversion Tool (SCT)**converts the schema and code between different database engines (e.g. Oracle to Aurora PostgreSQL) for heterogeneous migrations. The exam pattern: DMS for the data migration/replication (with CDC for near-zero-downtime cutover), SCT for converting schema when changing engines. (Covered further in the migration volume.)

12.6 Banking Production Scenario

A bank’s polyglot data layer uses Aurora for the transactional ledger, DynamoDB for high-scale session/activity data (with DAX for microsecond reads), and ElastiCache Redis for HA session caching with failover. Analytics runs on Redshift (with Spectrum querying archived data in S3) for BI over years of transactions. Specialized needs map to purpose-built engines: Neptune models fraud rings as a graph, Timestream stores infrastructure and market time-series, and QLDB provides an immutable, verifiable audit ledger for compliance. Migrating a legacy Oracle system to Aurora PostgreSQL uses SCT for schema conversion and DMS with change data capture for a near-zero- downtime cutover. This deliberate use of the right database per workload is exactly the professional-level data architecture the certification expects.

12.7 Chapter Revision Notes

  • ElastiCache Redis (HA, persistence, replication, advanced structures) vs Memcached (simple scale-out cache); MemoryDB = durable in-memory Redis-compatible primary store; DAX for DynamoDB caching.
  • Redshift = columnar OLAP data warehouse (analytics at scale); Spectrum queries S3, Serverless removes cluster management; not for OLTP.
  • Purpose-built: Neptune (graph), DocumentDB (MongoDB), Keyspaces (Cassandra), Timestream (time-series), QLDB (immutable verifiable ledger).
  • DMS migrates/replicates databases (CDC for low-downtime cutover); SCT converts schema for heterogeneous engine changes.
  • Match the data model to the purpose-built service rather than forcing everything into one database.