Asterrr's Handbook

Purpose-built databases

Choosing between RDS, Aurora, DynamoDB, DocumentDB, Neptune, Keyspaces, Timestream, MemoryDB, Redshift and OpenSearch, and the DynamoDB and Aurora features the exam tests.

Exam tasks: 2.5 (select database and storage for performance), 4.3 (choose new architectures, including purpose-built databases)

The decision: what shape is the data and the access pattern (relational joins, key lookups, documents, graph traversals, time series, analytics or search), and how much scale, latency and operational effort is acceptable?

Choosing a database

Time-series data (IoT sensors, metrics) with time-window queries goes to Timestream, and a ledger or audit trail usually lands in a regular database with an append-only design (see the QLDB note below).

Side by side

ServiceModelSignals in a question
RDSRelational: MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Db2Commercial engine, lift and shift, license needs
AuroraRelational, MySQL- or PostgreSQL-compatibleHigh throughput, 15 replicas, fast failover, global reads
Aurora DSQLDistributed serverless PostgreSQL-compatibleActive-active SQL across Regions
DynamoDBKey-value and documentSingle-digit ms at any scale, serverless, known access patterns
DocumentDBDocument, MongoDB-compatibleMigrate a MongoDB workload with minimal changes
NeptuneGraph (Gremlin, openCypher, SPARQL)Social networks, fraud rings, recommendations, knowledge graphs
KeyspacesWide-column, Cassandra-compatible (CQL)Migrate Cassandra without running clusters
TimestreamTime seriesIoT telemetry, DevOps metrics, time-window queries
MemoryDBDurable in-memory, Valkey- and Redis OSS-compatibleMicrosecond reads and durability as the primary DB
RedshiftColumnar data warehouseBI, complex aggregations, petabyte analytics
OpenSearch ServiceSearch and log analyticsFull-text search, log exploration, dashboards

Legacy: use Aurora PostgreSQL or DynamoDB with an append-only design instead

Amazon QLDB, the managed ledger database, reached end of support in July 2025. Older material still names it as the answer for an immutable, cryptographically verifiable journal.

Legacy: use Timestream for InfluxDB instead

Timestream for LiveAnalytics closed to new customers in June 2025. New time-series designs use Timestream for InfluxDB. Exam questions that just say "Timestream" still mean the time-series service in general.

Read replicas vs Multi-AZ

Multi-AZ (instance)Multi-AZ DB clusterRead replicas
PurposeAvailabilityAvailability plus read scalingRead scaling
ReplicationSynchronousSemi-synchronousAsynchronous
Standby readableNoYes, two readable standbysYes
FailoverAutomatic, DNS endpoint movesAutomatic, typically fasterManual promotion
Cross-RegionNoNoYes
  • Aurora is different: storage keeps six copies across three AZs regardless, replicas share that storage, and any replica can be the failover target (tiers set the order). Failover usually takes under a minute.
  • A cross-Region read replica is a cheap DR option for RDS. For Aurora, Global Database is the better one.

Read replicas for high availability

A read replica doesn't fail over automatically, so it isn't an HA answer for RDS. And Multi-AZ instance standbys can't serve reads, so they don't fix a read bottleneck. Match the feature to the problem.

Aurora features

  • Serverless v2 scales capacity in fine-grained ACUs within seconds, and can scale to zero when idle. Mix serverless and provisioned instances in one cluster, for example a provisioned writer with serverless readers.
  • Global Database replicates storage to up to 10 secondary Regions, typically with under a second of lag. Managed switchover for planned moves, failover for a regional outage. Write forwarding lets apps in a secondary Region send writes that the primary executes.
  • Cloning uses copy-on-write, so a clone of a multi-TB cluster is ready in minutes and costs only for changed pages. Good for test copies of production.
  • Backtrack (Aurora MySQL) rewinds a cluster in place to a point in time, without a restore.
  • Custom endpoints send analytics queries to a subset of larger replicas.

Exam signal

"Test environment with a copy of production, created quickly, minimal extra storage" means Aurora cloning. "Unpredictable, spiky or intermittent SQL workload" means Aurora Serverless v2.

DynamoDB in depth

Capacity modes

On-demandProvisioned
BillingPer requestPer RCU and WCU per hour
Best forUnknown, spiky or new workloadsSteady, predictable traffic
ScalingAutomaticAuto scaling within limits you set
Cost leverNone beyond the modeReserved capacity for steady baselines

You can switch modes on a table periodically, so start on-demand and move to provisioned once traffic is known.

Indexes

Global secondary indexLocal secondary index
KeysAny partition and sort keySame partition key, different sort key
When createdAnytimeOnly at table creation
ConsistencyEventually consistentStrong or eventual
CapacityIts ownShares the table's
Size limitNone10 GB per partition key value
Per table20 by default5

Adding an LSI later

An LSI can't be added to an existing table. If a question needs a new query pattern on a live table, the answer is a GSI (or a new table and a migration).

Other features

  • Streams: an ordered, 24-hour log of item changes, consumed by Lambda or the Kinesis Client Library adapter. Use it for triggers, audit and cross-system sync. Kinesis Data Streams for DynamoDB is the alternative for longer retention and more consumers.
  • Global tables: multi-Region, multi-active. The default mode is eventually consistent with last writer wins. Multi-Region strong consistency (three Regions, or two plus a witness) gives an RPO of zero at higher write latency.
  • TTL deletes expired items in the background for free, usually within a few days of expiry. Deletions appear in the stream, so you can archive them to S3.
  • PITR restores to any second in the last 35 days (the window is configurable) into a new table. On-demand backups are kept until you delete them.
  • Transactions give all-or-nothing writes across up to 100 items.
  • Maximum item size is 400 KB. Store larger objects in S3 and keep a pointer.
400 KB
Maximum DynamoDB item size.
35 days
DynamoDB PITR window.
24 hours
DynamoDB Streams retention.
15
Aurora replicas per cluster.
10
Secondary Regions per Aurora Global Database.
6 copies
Aurora storage copies, across three AZs.

The rest, briefly

  • DocumentDB: storage architecture like Aurora's, MongoDB API compatibility, global clusters. Elastic clusters shard for very large write scale.
  • Neptune: use it when queries walk relationships several hops deep, which is slow and awkward in SQL. Neptune Analytics handles large in-memory graph algorithms.
  • Keyspaces: serverless Cassandra. No nodes, compaction or repair to manage.
  • MemoryDB: a Multi-AZ transaction log makes writes durable, so it can be the only database. ElastiCache is a cache in front of another database.
  • Redshift: RA3 nodes separate compute from managed storage. Redshift Serverless for intermittent use. Concurrency scaling handles bursts. See analytics patterns.
  • OpenSearch Service: see analytics patterns.

Scenarios

Scenario · choose 2
A logistics company runs a PostgreSQL order database on RDS. Reporting queries every morning slow down order entry. The company also wants the database to survive an AZ failure with automatic failover. Which TWO actions should the architect take?
Scenario
A payments startup builds a fraud-detection feature that must find accounts linked through shared devices, cards and addresses, up to four hops away, in under a second. The current SQL queries with recursive joins time out. Which database should the architect choose?
Scenario
A media app on DynamoDB has a table keyed by user ID. The product team now needs to query all items by upload date across all users. The table has been in production for a year. What should the architect do?

Further reading

On this page