SkillSprout
Chapter 5 · Lesson 1
Beginner
5 min read

Database Services

Overview

AWS offers purpose-built databases: instead of forcing every problem into one database, you choose the type that fits the data and access pattern. Most are managed services, meaning AWS handles provisioning, patching, backups and failover.

Think of a toolbox. A relational database is a sturdy filing cabinet with strict, related folders. A key-value NoSQL database is a locker room where you fetch items instantly by number. A data warehouse is an archive room built for big analysis, and a cache is the desk drawer for things you use every minute.

The exam asks you to match a requirement - "relational", "key-value with single-digit millisecond latency", "in-memory cache", "graph", "data warehouse" - to the correct service.

Key Concepts

  • Amazon RDS is a managed relational database service supporting MySQL, PostgreSQL, MariaDB, Oracle, SQL Server and Db2.
  • Amazon Aurora is an AWS-built MySQL- and PostgreSQL-compatible relational database with higher performance and up to 15 read replicas; Aurora Serverless scales automatically.
  • Amazon DynamoDB is a serverless NoSQL key-value and document database with single-digit millisecond performance at any scale.
  • Amazon ElastiCache (Redis OSS / Valkey, Memcached) is an in-memory cache that speeds up applications.
  • Amazon Redshift is a data warehouse for large-scale analytical (OLAP) queries using SQL.
  • Amazon DocumentDB (MongoDB-compatible), Amazon Neptune (graph), Amazon Keyspaces (Cassandra), Amazon Timestream (time series) have dedicated services.
  • RDS Multi-AZ gives high availability via a standby in another AZ; read replicas scale read traffic.
  • AWS Database Migration Service (DMS) and Schema Conversion Tool help migrate databases to AWS.

Detailed Notes

Match the database to the need

NeedServiceNotes
Traditional relational (SQL), joins, transactionsRDSManaged engines, Multi-AZ, read replicas
High-performance relational, cloud-nativeAuroraMySQL/PostgreSQL compatible, 6 copies of data across 3 AZs
Serverless key-value / document at massive scaleDynamoDBSingle-digit ms, global tables, on-demand capacity
Microsecond cachingElastiCache / DynamoDB DAXIn-memory
Data warehouse / analytics (SQL)RedshiftColumnar storage, petabyte scale
MongoDB-compatible documentsDocumentDBManaged
Highly connected data (graph)NeptuneSocial networks, fraud detection
Time series (IoT metrics)TimestreamPurpose-built
Wide-column Cassandra workloadsKeyspacesManaged

Relational versus NoSQL

AspectRelational (RDS/Aurora)NoSQL (DynamoDB)
SchemaFixed tables and relationshipsFlexible items
QuerySQL with joinsKey-based and index queries
ScalingVertical plus read replicasHorizontal, virtually unlimited
Typical useERP, e-commerce ordersSessions, carts, leaderboards, IoT

What RDS manages for you

AWS handles hardware provisioning, OS and database patching, automated backups, point-in-time recovery and failover. You manage the schema, queries, users and network access. You cannot SSH into RDS instances (except RDS Custom).

FeaturePurpose
Multi-AZHigh availability: synchronous standby, automatic failover
Read replicasPerformance: offload read traffic, can be cross-Region
Automated backupsDaily snapshot plus transaction logs, up to 35 days retention
Manual snapshotsKept until deleted

Multi-AZ is for availability; read replicas are for scaling reads. The exam loves this distinction.

bash
aws rds create-db-instance --db-instance-identifier orders-db \
  --engine postgres --db-instance-class db.t3.micro --allocated-storage 20 \
  --master-username admin --manage-master-user-password --multi-az

DynamoDB at a glance

json
{
  "TableName": "Carts",
  "KeySchema": [{ "AttributeName": "userId", "KeyType": "HASH" }],
  "AttributeDefinitions": [{ "AttributeName": "userId", "AttributeType": "S" }],
  "BillingMode": "PAY_PER_REQUEST"
}

Highlights: on-demand or provisioned capacity, global tables for multi-Region active-active, DynamoDB Streams, point-in-time recovery and DAX for microsecond caching.

Aurora highlights

Aurora replicates data six ways across three AZs, fails over quickly, and offers Aurora Serverless v2 that scales capacity automatically, and Aurora Global Database for cross-Region reads and disaster recovery.

Self-managed versus managed databases

AspectDatabase on EC2Managed (RDS, Aurora, DynamoDB)
Patching and upgradesYouAWS
Backups and failoverYou script itBuilt in (Multi-AZ, automated backups)
OS accessFullLimited or none
CustomisationMaximum (any version, plugin)Within supported features
Staff effortHighLow

Choose EC2-hosted only when you need an unsupported engine or deep OS control.

Migration

AWS DMS moves data between databases with minimal downtime, including heterogeneous migrations (for example Oracle to Aurora PostgreSQL) combined with the Schema Conversion Tool.

Real World Example

An e-commerce company stores orders and customer accounts in Amazon Aurora PostgreSQL (relational, transactional) with Multi-AZ failover. Shopping carts and sessions live in DynamoDB for fast key lookups that scale for flash sales, and a product catalogue cache in ElastiCache cuts database reads.

Nightly, data is loaded into Amazon Redshift where analysts run sales reports without slowing the production databases.

Architecture Diagram

Purpose-built databases in one application
Architecture
AWS Cloud
Application
ElastiCache
Aurora / RDSMulti-AZ
DynamoDB
RedshiftAnalytics
  1. 1The application checks ElastiCache first for hot data.
  2. 2Transactional order data is read and written in Aurora or RDS.
  3. 3Key-value data such as carts goes to DynamoDB.
  4. 4Data is periodically copied to Redshift for analytics.

Best Practices

  • ✓Pick a purpose-built database for each access pattern.
  • ✓Use Multi-AZ for production RDS and read replicas for read-heavy load.
  • ✓Encrypt databases with KMS and keep them in private subnets.
  • ✓Use Secrets Manager to rotate database credentials.
  • ✓Use DynamoDB on-demand for unpredictable traffic and enable point-in-time recovery.

Common Interview Questions

Exam Tips

CLF-C02 focus

  • "Relational" = RDS / Aurora; "key-value, serverless" = DynamoDB.
  • "Data warehouse" = Redshift; "in-memory cache" = ElastiCache; "graph" = Neptune.
  • "High availability for RDS" = Multi-AZ; "improve read performance" = read replica.
  • "Migrate databases with minimal downtime" = AWS DMS.

Finished this lesson?

0 of 43 lessons done · 0% of the course