Databases
Match a data need to the right AWS database: relational, key-value, in-memory, warehouse or graph.
15 min
Pick a database by the shape of the data and the access pattern.
- Relational (SQL): tables with rows, columns and joins. Amazon RDS runs managed engines (MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Db2). AWS handles backups, patching and failover, and you handle schema and queries. Amazon Aurora is AWS's own MySQL- and PostgreSQL-compatible engine, built for higher performance and availability.
- Key-value / NoSQL: Amazon DynamoDB is a serverless key-value and document database with single-digit-millisecond performance at any scale.
- In-memory: Amazon ElastiCache (Redis OSS-compatible and Memcached) caches hot data in memory to speed up applications.
- Data warehouse: Amazon Redshift runs complex analytic queries over large amounts of structured data.
- Document: Amazon DocumentDB (MongoDB-compatible).
- Graph: Amazon Neptune for highly connected data such as social networks and fraud rings.
- Wide-column: Amazon Keyspaces (Cassandra-compatible). Time series: Amazon Timestream.
To move databases, use AWS Database Migration Service (DMS). When the engine changes, add the AWS Schema Conversion Tool (SCT).
Which database?
A managed relational database for an existing app
- Choose
- Amazon RDS
A relational database with higher performance and built-in replication
- Choose
- Amazon Aurora
Millions of requests per second with simple lookups, serverless
- Choose
- Amazon DynamoDB
Sub-millisecond reads for a hot data cache
- Choose
- Amazon ElastiCache
Analytics over petabytes of structured data
- Choose
- Amazon Redshift
MongoDB-compatible documents
- Choose
- Amazon DocumentDB
Relationships between entities
- Choose
- Amazon Neptune
Migrate a database with minimal downtime
- Choose
- AWS DMS
RDS on a managed service versus a database on EC2.
Amazon RDS
- AWS handles
- Hardware, OS and engine patching, backups, Multi-AZ failover
- You handle
- Schema, queries, access, tuning
- Typical choice
- Most apps
Best for Less operations work
Database on EC2
- AWS handles
- Hardware only
- You handle
- Everything above the hypervisor, including patches and backups
- Typical choice
- Needs a custom or unsupported setup
Best for Full control
Select the database.
A mobile game needs to store player profiles and read them in a few milliseconds, with unpredictable traffic spikes and no servers to manage.
“Multi-AZ on RDS makes the database faster to read.”
More copies sound like more speed.
What is actually true
Multi-AZ keeps a standby copy in another AZ for availability and automatic failover. To scale reads, use read replicas.
How to catch yourself
If the question says 'failover' or 'high availability', think Multi-AZ. If it says 'read-heavy' or 'scale reads', think read replicas.
- RDS and Aurora are managed relational. DynamoDB is serverless NoSQL. ElastiCache is in-memory. Redshift is the data warehouse.
- Multi-AZ is for failover. Read replicas are for read scaling.
- DocumentDB is MongoDB-compatible and Neptune is graph.
- Use DMS to migrate databases.
Choose the database.
Which AWS service is a fully managed, serverless NoSQL database with single-digit-millisecond latency?
- AAmazon DynamoDB
- BAmazon Redshift
- CAmazon RDS
- DAmazon Neptune
Which service is built for running analytic queries on large volumes of structured data?
- AAmazon DocumentDB
- BAmazon Aurora
- CAmazon Redshift
- DAmazon ElastiCache
A company wants to move an on-premises database to AWS with minimal downtime. Which service helps?
- AAmazon Redshift
- BAWS Snowball only
- CAWS Database Migration Service
- DAWS Backup
Which RDS feature provides automatic failover to a standby in another AZ?
- ARead replica
- BMulti-AZ deployment
- CReserved Instance
- DInstance store
Which service caches frequently read data in memory to reduce database load?
- AAmazon Neptune
- BAWS Glue
- CAmazon ElastiCache
- DAmazon Timestream
Practise this lesson, not just read it
In BiliMind the questions above are marked when you answer, the flashcards come back on a schedule, and the rest of AWS Certified Cloud Practitioner (CLF-C02) is planned around your week. Free.