A database is a program that stores organized information so it can be found quickly, and a relational database stores it in tables that are related to each other. For example, an online store stores its customers, its products and its orders in tables, where each order points to a customer and to several products. That way, when the store opens an order, it knows who placed it and what they bought without writing the customer's name in every order. This type of database is the one used by ERPs, CRMs and almost any e-commerce site.
On AWS you can have a relational database in two ways. The first is to install it yourself on an EC2 instance, and the second is to use a managed service, where AWS does the backups and the patching for you. For example, if the store installs its database on EC2, someone on its team has to remember to back it up every night; with the managed service, AWS does it on its own.
Who manages the database?

The Amazon RDS guide compares three places where a database can live, and in each one AWS takes care of a different part of the work:
- On premises, that is, on computers your company buys and keeps in its own building, which is where you do everything, from power and cooling to the database.
- On Amazon EC2, where AWS takes care of the hardware, and you install, patch, back up and scale the database, that is, give it more capacity as it grows.
- On Amazon RDS, where AWS takes care of almost everything, and all that is left for you is to optimize your application, that is, make it request the data in the best way.
That is why AWS recommends RDS as the default option for most relational databases. Installing the database on EC2 makes sense when you need full control, for example when you need a version or a configuration of the engine that RDS doesn't offer. For example, the store uses RDS so it doesn't have to deal with backups or patching, while a bank that needs a very old version of its engine installs it on EC2 and looks after it itself.
Amazon RDS

Amazon RDS (Relational Database Service) is the AWS service for managed relational databases. In RDS you choose the engine and the size of the database, and AWS takes care of backups, patching, failure detection and recovery. For example, if the computer running the store's database fails in the middle of the night, RDS detects it and recovers it without anyone at the store having to wake up.
RDS offers the best-known database engines, which are IBM Db2, MariaDB, Microsoft SQL Server, MySQL, Oracle Database and PostgreSQL. Also, Amazon Aurora is part of RDS too. For example, if the store already used MySQL on its own computer, it chooses MySQL on RDS and its application keeps talking to the database the same way.
What is the difference between Multi-AZ and a read replica?
Multi-AZ and read replicas are two RDS features that create another copy of your database, and that is why they get confused. However, each one solves a different problem, because Multi-AZ keeps the database available if something fails and the read replica makes the database respond faster. For example, the store uses Multi-AZ to keep selling if a data center goes down, and uses a read replica so its reports don't slow down the website.

Multi-AZ
In a Multi-AZ deployment, RDS keeps a standby instance in another Availability Zone, synchronized with the primary, that is, with the same data at all times. If the primary instance fails, RDS switches to the standby instance without you doing anything, and that switch is called failover. For example, if the zone where the store's primary database lives loses power, RDS switches to the copy in the other zone and customers keep shopping.
In the deployment with a single standby instance, that copy doesn't serve reads, because it is only there for availability. There is also the Multi-AZ cluster, with two standby instances that do serve reads. For example, with a single standby instance, the store can't send queries to that copy while the primary is working.
Read replica
A read replica is a read-only copy of the database, that is, a copy that data can be read from but not written to. The application sends it queries that read a lot, such as heavy end-of-month reports. That way, the replica takes load off the primary database and the application doesn't slow down. For example, the store's accounting team runs its monthly sales report on the replica, while customers keep shopping on the primary database without noticing anything.
Amazon Aurora

Amazon Aurora is the relational database built by AWS. Aurora is compatible with MySQL and PostgreSQL, so the code and tools you already use with those engines work with it. For example, if the store's application already works with MySQL, it can move to Aurora without rewriting how it saves and reads its orders.
The Aurora documentation attributes three characteristics to it:
- Performance, which reaches up to 6 times the throughput of standard MySQL and PostgreSQL. For example, the store can handle more orders per second on its biggest sales day.
- Copies of the data, which are stored in three Availability Zones in the same Region, so the data is still there if a zone fails. For example, if a zone goes out of service, the store's orders are still stored in the other two.
- The volume, which is the space where the data is stored and which grows on its own up to 256 TiB. For example, the store doesn't have to ask for more space when its catalog grows.
Other AWS databases
Apart from RDS and Aurora, AWS has Amazon Redshift, a managed, petabyte-scale data warehouse. A data warehouse is a store where huge amounts of data are gathered to analyze them with SQL, the language used to ask a database questions. Databases that don't store data in related tables, such as Amazon DynamoDB, are called NoSQL databases. For example, the store keeps its orders in Aurora, gathers years of sales in Redshift to analyze them and can store each customer's cart in DynamoDB.
How do you recognize each option on the exam?
In questions about relational databases, look in the question for how much the company wants to manage. These are the phrases that point to each option:
- "Less administrative work", "automatic backups and patching" or "managed relational database", which point to RDS.
- "Full control of the operating system or the engine", which points to installing the database on EC2.
- "Compatible with MySQL or PostgreSQL" together with "high performance", which points to Aurora.
When the question is about Multi-AZ or replicas, look for the problem to solve:
- "If the zone fails", "high availability" or "failover", which point to Multi-AZ.
- "Reporting queries slow down the database" or "scale reads", which point to a read replica.
- "Data warehouse" or "analyze petabytes", which point to Redshift.
For example, if a question says that a school wants its grades database to keep working even if a zone fails, the phrase points to Multi-AZ.
cloud path tip: if you use an account with the new AWS experience, RDS and Aurora are included in the free plan, while Redshift is only available with the paid plan.