Skip to content
6 min read·Lesson 5 of 10

Database Services

Survey AWS database offerings — RDS, Aurora, DynamoDB, ElastiCache, and more — and learn which to use when.

AWS offers a broad portfolio of managed database services so you can match the right database engine and model to your application's needs. Managed services handle patching, backups, replication, and failover — freeing you from database administration work.

Amazon RDS — Relational Database Service

RDS provides managed relational databases supporting six engines: MySQL, PostgreSQL, MariaDB, Oracle, Microsoft SQL Server, and Amazon Aurora.

Key RDS Features

  • Automated backups: Daily snapshots + transaction logs. Restore to any point in the retention window (up to 35 days).
  • Multi-AZ deployments: Synchronous standby replica in a second AZ. Automatic failover in ~60 seconds. Use for production high availability.
  • Read replicas: Asynchronous copies for read-heavy workloads. Up to 5 replicas (MySQL, PostgreSQL). Can be in different regions.
  • Encryption: At-rest (AWS KMS) and in-transit (TLS).
  • Parameter groups / option groups: Customise DB engine settings.

When to Use RDS

Use RDS when you need traditional SQL with ACID transactions, structured schemas, and complex JOINs — such as e-commerce, ERP, or any application that already uses a relational database.

Amazon Aurora

Aurora is AWS's cloud-native relational database — compatible with MySQL and PostgreSQL but rebuilt for cloud performance and availability.

  • Up to 5× faster than MySQL, 3× faster than PostgreSQL
  • Storage auto-scales from 10 GB to 128 TB in 10 GB increments
  • Data is automatically replicated 6 ways across 3 AZs
  • Failover typically completes in under 30 seconds
  • Aurora Serverless v2: Scales capacity automatically in fine-grained increments; ideal for variable workloads
  • Aurora Global Database: Replicates to up to 5 secondary regions for disaster recovery

Amazon DynamoDB

DynamoDB is a fully managed serverless NoSQL database — key-value and document model. It's the go-to AWS database when you need:

  • Single-digit millisecond performance at any scale
  • Automatic horizontal scaling
  • No schema management
  • Serverless billing (pay per read/write, or provision capacity)

Key concepts:

  • Table: Collection of items (rows)
  • Item: A single record (like a row); up to 400 KB
  • Primary key: Partition key alone, or partition key + sort key
  • GSI (Global Secondary Index): Query on non-primary-key attributes
  • DynamoDB Streams: Change data capture feed for Lambda triggers
  • DAX (DynamoDB Accelerator): In-memory cache, microsecond read latency

Amazon ElastiCache

ElastiCache provides managed in-memory caching. It sits in front of a database to serve frequently read data at microsecond speed, dramatically reducing database load.

  • Redis: More features — persistence, pub/sub, sorted sets, Lua scripting. Cluster mode for horizontal scaling.
  • Memcached: Simple, high-throughput caching. Multi-threaded. No persistence.

Other Database Services

ServiceTypeUse Case
Amazon RedshiftData warehouse (columnar SQL)Analytics, business intelligence
Amazon DocumentDBMongoDB-compatible document DBJSON documents, content management
Amazon NeptuneGraph databaseSocial networks, fraud detection, knowledge graphs
Amazon KeyspacesManaged Apache CassandraWide-column, time-series
Amazon TimestreamTime-series databaseIoT sensor data, metrics
Amazon QLDBLedger databaseImmutable audit trail, financial records

Choosing the Right Database

RequirementService
Traditional SQL with transactionsRDS or Aurora
Maximum performance SQLAurora
Serverless NoSQL, unlimited scaleDynamoDB
Caching layerElastiCache
Analytics / BIRedshift
Document storeDocumentDB

Next: networking in AWS — VPCs, subnets, security groups, and how traffic flows in the cloud.

Key Takeaways

  • RDS manages relational databases (MySQL, PostgreSQL, Oracle, SQL Server, MariaDB).
  • Aurora is AWS's cloud-native relational DB — up to 5× faster than MySQL, highly available by default.
  • DynamoDB is a serverless NoSQL key-value and document database with single-digit millisecond performance.
  • ElastiCache (Redis/Memcached) provides in-memory caching to reduce database load.
  • Use RDS Multi-AZ for production high availability; read replicas for read-heavy workloads.

Test your knowledge

Try exam-style practice questions to reinforce what you've learned.

Practice Questions →