aws

Databases (AWS Services)

Overview of AWS database services including RDS, DynamoDB, RedShift, and purpose-built databases like QLDB and DocumentDB with use cases for each.

AWS offers a database service for almost every data shape: relational, key/value, columnar, and a handful of purpose-built engines. Here’s a rundown of each one and when I’d reach for it.

Database services AWS offers

  • RDS for relational data
  • Key/value with Amazon DynamoDB
  • RedShift for data warehouses
  • Purpose-built solutions such as QLDB and DocumentDB

RDS

Relational Database Service is the right choice when your data is relational. Amazon offers Aurora, and you can also run Postgres, MySQL, Oracle, or MariaDB on it. It’s good for ACID transactions (Atomic, Consistent, Isolated, Durable) and features like referential integrity, and it works well when your data structures are static and unchanging.

RDS also supports read replicas, so instead of querying the live database you can query a replica and offset the load on the primary.

Key/value store (NoSQL)

AWS offers DynamoDB as its key/value store. These databases are redundant and consistent, and they handle large amounts of data with a steady flow of read and write operations, which is why they show up in online shopping carts and online gaming, where keeping user session state matters.

DynamoDB automatically spreads data and traffic for a table across servers to handle throughput while keeping performance fast and consistent. It’s built for low latency, and it supports DAX (DynamoDB Accelerator), an in-memory cache for frequently requested items.

RedShift

RedShift is a data warehouse: it stores data in columns, which makes it good for analytics. It also uses AQUA (Advanced Query Accelerator), a hardware-accelerated cache that handles a substantial share of data processing in place of the cache, making RedShift 10x faster.

Purpose-built databases

  • QLDB: a fully managed ledger database, good for tracking financial changes and records.
  • Amazon DocumentDB: a MongoDB-compatible database that stores JSON documents.
  • Amazon Neptune: a fully managed graph database.
  • Amazon Keyspaces: essentially Apache Cassandra. See the Amazon Keyspaces overview.

Database migrations

There are two types of migrations:

  • Like to like, also known as homogeneous (MySQL to MySQL)
  • Like to unlike, also known as heterogeneous (MySQL to Postgres)

AWS offers DMS (Data Migration Service) to run these migrations. For like-to-unlike migrations, you run the schema through SCT (Schema Conversion Tool) before handing it to DMS.