Skip to Content

Databases

The kinds of database AWS offers, the questions that decide which one fits, and the pages in this group.

What it is

A database keeps an application's data and answers questions about it. AWS runs many kinds of database as managed services: AWS handles the servers, patching, backups and replication, and the customer works with the data.

There's no single best database. Each kind is built for a shape of data and a way of reading it. Choosing well is a big part of the exam, so this page starts with the map.

Database types

Database types on AWS: relational (RDS, Aurora), key-value (DynamoDB), in-memory (ElastiCache), document (DocumentDB), graph (Neptune), wide-column (Keyspaces), time series (Timestream) and data warehouse (Redshift) Database types on AWS: relational (RDS, Aurora), key-value (DynamoDB), in-memory (ElastiCache), document (DocumentDB), graph (Neptune), wide-column (Keyspaces), time series (Timestream) and data warehouse (Redshift)

Each kind of data has a database built for it.
  • Relational (SQL, OLTP): tables with a fixed schema, joined with SQL, with transactions. Good for orders, accounts and anything with relationships between records. RDS and Aurora.
  • Key-value (NoSQL): look up an item by its key, at any scale, with no joins. DynamoDB.
  • In-memory: data kept in RAM for sub-millisecond reads, mostly as a cache in front of another database. ElastiCache.
  • Document: JSON documents with flexible fields, queried by any field. DocumentDB (MongoDB-compatible).
  • Graph: things and the links between them, for questions like "friends of friends". Neptune.
  • Wide-column: Apache Cassandra tables, for huge write-heavy workloads. Keyspaces.
  • Time series: values measured over time, such as sensor readings. Timestream.
  • Data warehouse (OLAP): SQL analytics over large amounts of history. Redshift, covered with Athena and EMR in the Analytics group.
  • Object storage (S3) and search (OpenSearch) also hold data, and are covered in their own groups.

Updated since the slides

The slides list Amazon Quantum Ledger Database (QLDB) for ledger data. AWS has discontinued QLDB: its page now points to Aurora PostgreSQL instead. It isn't needed for the exam.

Choosing the right database

Before picking a service, answer these questions about the workload:

  • Reads and writes: read-heavy, write-heavy or balanced? How much throughput, and does it change during the day?
  • Size and growth: how much data, for how long, and how big is each item? How is it accessed?
  • Durability: is this the source of truth, or a copy that can be rebuilt (a cache)?
  • Latency and concurrency: milliseconds or microseconds? How many users at once?
  • Data model: structured, semi-structured or connected? Are joins needed, or simple lookups by key?
  • Schema: fixed and strict, or changing often? Is reporting or search needed?
  • Licences: paying for Oracle or SQL Server licences? Moving to Aurora removes them.

Example

An online shop might use three databases. Orders and payments live in Aurora, because they need transactions and joins. The shopping cart and session data live in DynamoDB, because every request reads one cart by its key. Product pages are cached in ElastiCache, so the database isn't asked for the same page thousands of times a minute.

In this group

Relational: RDS

Relational: Aurora

RDS and Aurora operations

Caching

NoSQL

Each service in one line

  • RDS: managed relational database for MySQL, PostgreSQL, MariaDB, Oracle, SQL Server or Db2. The instance size and storage are chosen. For SQL, joins and transactions.
  • Aurora: AWS's own MySQL- and PostgreSQL-compatible engine. Storage is separate from compute and kept in six copies; more performance and less management than RDS.
  • ElastiCache: managed Valkey, Redis OSS or Memcached. In-memory key-value store, sub-millisecond. Needs application code changes.
  • DynamoDB: serverless NoSQL key-value tables, single-digit millisecond at any scale. Great for serverless apps and fast-changing schemas.
  • DocumentDB: MongoDB-compatible document database. Neptune: graph database. Keyspaces: Cassandra-compatible tables. Timestream: time series.
  • S3: objects of any size by key; great for big files, not for many tiny items. Covered in the Amazon S3 group.

Exam tips

  • "Relational", "SQL", "joins", "transactions", "OLTP" → RDS or Aurora.
  • "MySQL or PostgreSQL with the best performance and availability", "less management" → Aurora.
  • "Oracle or SQL Server with access to the operating system" → RDS Custom.
  • "Serverless NoSQL", "key-value", "millions of requests per second", "schema changes often" → DynamoDB.
  • "Cache", "sub-millisecond", "session store", "reduce database load" → ElastiCache (or DAX for DynamoDB).
  • "MongoDB" → DocumentDB. "Graph", "relationships", "social network", "fraud rings" → Neptune. "Cassandra", "CQL" → Keyspaces. "Time series", "IoT sensor data" → Timestream.
  • "Analytics", "data warehouse", "OLAP", "BI" → Redshift.

Common traps

  • "DynamoDB for complex joins and reporting." DynamoDB has no joins; use a relational database or Redshift.
  • "ElastiCache as the main database." It's a cache: fast, but the source of truth should be a durable database.
  • "RDS for a schema that changes every week with millions of writes a second." That's a NoSQL workload; DynamoDB fits better.

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt