All guides
Practice now
D2 · Design for New Solutions

Advanced databases: Aurora Global, DynamoDB and ElastiCache

The SAP-C02 evaluates correct database selection for each workload, as well as the advanced features of Aurora, DynamoDB and ElastiCache for designing highly available, high-performance systems.

Icon-Architecture/48/Arch_Amazon-RDS_48

Database selection framework

WorkloadRecommended serviceWhy
Relational OLTP (web apps) MySQL/PostgreSQL or AuroraACID transactions, complex relationships, standard SQL
High-performance OLTP with global HAAurora Global Database< 1s replication between regions, fast failover
Key-value / documents at massive scalems latency, unlimited scale, serverless
Graphs (relationships between entities)Amazon NeptuneGraph traversal with Gremlin or SPARQL
Analytical (OLAP)RedshiftColumnar, complex joins, petabyte scale
Query result cachingElastiCache (Redis/Memcached)Sub-ms latency, reduces load on the primary DB
Time series (metrics, IoT)Amazon Timestream for InfluxDBOptimized for time-series, temporal queries
Immutable, verifiable ledgerAurora PostgreSQL + auditing (QLDB was retired)Change history with audit tables and S3 Object Lock
MongoDB-compatible documentsAmazon DocumentDBCompatible with MongoDB drivers, AWS-managed
Distributed global transactional SQLAmazon Aurora Serverless v2Auto-scaling, multi-region via Global DB
Icon-Architecture/48/Arch_Amazon-Aurora_48

Amazon Aurora — advanced features

Aurora is AWS's proprietary database engine, compatible with MySQL and PostgreSQL. 5× faster than MySQL and 3× faster than standard PostgreSQL. Storage auto-scales up to 128 TB.

Aurora Global Database

    Replication lag< 1 second between the primary region and up to 5 secondaries. Replication happens at the storage level (not the DB engine level).
    FailoverPromote to primary in < 1 minute. Very low RTO for cross-region DR.
    Local readsApps in secondary regions read from the local region (low ). Only the primary region accepts writes.
    Use casesGlobal apps, cross-region , multi-region reporting without affecting the primary.

Aurora Serverless v2

    Auto-scalingScales in fractions of an ACU (Aurora Capacity Units). From 0.5 to 128 ACUs in seconds.
    No downtimeScales without connection interruptions (unlike v1, which took minutes).
    Multi-AZSupports Multi-AZ for (v1 didn't support it).
    Ideal forUnpredictable workloads, development, multi-tenant SaaS with variable per-tenant load.

Aurora Read Replicas vs Multi-AZ

Read Replicas (up to 15)

  • • Serve read traffic (offload)
  • • Asynchronous replication
  • • Can be in a different region
  • • Can be manually promoted to primary
  • • Reduce read latency

Multi-AZ (Aurora native)

  • • Aurora natively keeps 6 copies of storage across 3
  • • Automatic failover to a replica in < 30s
  • • No performance degradation during failover
  • • Not the same as RDS Multi-AZ (different implementations)
Icon-Architecture/48/Arch_Amazon-DynamoDB_48

Advanced DynamoDB

Indexes

GSI (Global Secondary Index)

  • • Partition key and sort key different from the base table
  • • Efficient queries on non-primary-key attributes
  • • Capacity independent of the table
  • • Always eventually consistent
  • • Up to 20 GSIs per table
  • • Use case: looking up orders by customer_id (not the table's PK)

LSI (Local Secondary Index)

  • • Same partition key, different sort key
  • • Can only be created when the table is created
  • • Shares capacity with the base table
  • • Supports Strongly Consistent reads
  • • Up to 5 LSIs per table

Advanced features

DynamoDB Streams

Captures changes (INSERT, MODIFY, DELETE) in real time as an ordered stream. Trigger Lambda for event-driven patterns. 24h retention.

Global Tables

Multi-region active-active replication. Every region can read and write. Conflict resolution: "last write wins" by timestamp.

DAX

DynamoDB Accelerator: in-memory cache fully compatible with the DynamoDB API. Reduces latency from ms to microseconds. No app code changes needed.

Transactions

TransactWriteItems / TransactGetItems: ACID operations across multiple items/tables atomically. 2× the RCU/WCU cost.

TTL

Time-to-Live: automatically deletes expired items with no WCU cost. For sessions, cache, temporary data.

Icon-Architecture/48/Arch_Amazon-ElastiCache_48

ElastiCache — Redis vs Memcached

FeatureRedisMemcached
Data structuresStrings, Lists, Sets, Sorted Sets, Hashes, Bitmaps, HyperLogLogSimple strings only
PersistenceYes (RDB + AOF) — data survives restartsNo — memory-only data
ReplicationPrimary + up to 5 read replicasNo — no replication
Multi-AZ / FailoverYes — automatic failover to a replicaNo
Pub/SubYes — messaging channelsNo
Lua scriptingYes — complex atomic operationsNo
Horizontal shardingRedis Cluster: automatic, up to 500 shardsYes — multiple nodes in a pool
Best forLeaderboards, sessions, pub/sub, complex cachingSimple object cache, simple multithreaded workloads

Exam rule: when you need persistence or replication → Redis

If the scenario mentions "session state that must survive restarts", "leaderboard", "pub/sub", "automatic failover", or "complex structured data" → Redis. If it says "simple stateless object cache" or "multithreaded" → Memcached.

Icon-Architecture/48/Arch_Amazon-Neptune_48

Neptune, Timestream, DocumentDB and ledgers

Amazon Neptune

Managed graph database. Supports Property Graph (Gremlin, openCypher) and RDF (SPARQL). For social networks, fraud detection, recommendation engines where relationships between entities matter as much as the data itself.

Amazon QLDB (retired)

It was AWS's ledger database and reached end of support on July 31, 2025; AWS recommends migrating to Aurora PostgreSQL with audit tables. Immutable, cryptographically verifiable transaction log. Complete history of every change. For financial auditing, supply chain, compliance records where you must prove data hasn't been altered.

Amazon Timestream for InfluxDB

Managed time-series database running the InfluxDB engine. Optimized for timestamped data: IoT metrics, application logs, sensor data, with millisecond queries. The serverless variant, Timestream for LiveAnalytics, stopped accepting new customers in June 2025.

Amazon DocumentDB

MongoDB-compatible document database. Fully managed by AWS. For apps already using MongoDB that want a managed service without modifying application code.

Icon-Architecture/48/Arch_Amazon-Aurora_48

Database resilience patterns

Read Replica Offloading

Directs read queries (reporting, analytics) to Read Replicas to reduce load on the primary instance. Up to 15 replicas in Aurora; up to 5 in RDS.

Caching Strategy (Cache-Aside)

The app first queries ElastiCache. On a cache miss, it queries the DB and stores the result in cache. Reduces latency and DB load.

Write-Through Cache

Every DB write also updates the cache at the same time. Stronger consistency but slower than cache-aside.

Cross-Region Replication

Aurora Global DB or DynamoDB Global Tables for cross-region DR. RTO < 1 minute for Aurora Global.

Blue/Green Deployments (RDS)

RDS Blue/Green: creates an identical (green) environment with schema changes, synchronizes it, and allows a switchover with no downtime.

Icon-Architecture/48/Arch_Amazon-Aurora_48

Common exam traps

Trap: "DynamoDB Global Tables uses active-passive replication"

Reality: FALSE. Global Tables is active-active: every region accepts reads AND writes. In a simultaneous write conflict, the latest timestamp wins (last writer wins).

Trap: "Aurora Multi-AZ is the same as RDS Multi-AZ"

Reality: They're different. RDS Multi-AZ has a standby instance that doesn't serve traffic. Aurora replicates storage across 6 copies in 3 AZs and has up to 15 read replicas that DO serve traffic.

Trap: "ElastiCache Redis and DAX are interchangeable"

Reality: No. DAX is a cache specifically for DynamoDB with the same API. ElastiCache Redis is a general-purpose cache that requires caching logic in the app code.

Did you get this topic?

Test what you just learned

A global e-commerce application has its primary database in us-east-1. Users in Asia and Europe report high read latency. The company needs low read latency in every region and write capacity in the main region. What is the most appropriate solution?

Ready to test "Advanced Databases: Aurora Global, DynamoDB and ElastiCache"?

Put what you learned to the test with original SAP-C02 exam questions.

Start SAP-C02 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.