Ravindra BagaleCourses & study guides मराठी Track your progress

AWS Cloud

What Is Amazon Aurora? vs RDS MySQL and PostgreSQL

RDS MySQL is a managed restaurant kitchen with a fixed fridge size. Aurora is a cloud-native kitchen where the fridge grows as you store more food, and standby cooks share the same fridge. Same MySQL/PostgreSQL language — different engine under the hood.

In this chapter

  • What Aurora is compatible with
  • How Aurora storage differs from RDS
  • Aurora vs RDS MySQL/PostgreSQL table
  • Replicas, Serverless v2, cost sense

1. Everyday example

PhonePe-style apps need MySQL compatibility, fast failovers, and storage that does not make you guess disk size at 2 AM.

Amazon Aurora is a managed relational database compatible with MySQL and PostgreSQL. Storage is distributed, grows in 10 GB steps, and is replicated across AZs.

Aurora write path (idea)Appwrites to writer endpointWriter instancein one AZStorage volumesix copies across AZsReader instancessame storage
Readers scale read traffic without copying disks by hand.

2. Aurora vs RDS MySQL / PostgreSQL

A relational database stores related tables and lets applications ask for data using SQL. Aurora is an AWS-managed database engine compatible with supported versions of MySQL or PostgreSQL. An Aurora cluster combines database compute instances with a shared cluster storage volume. The writer receives changes to the data and readers can serve read-only connections. A reader is a separate compute instance, not a separate set of application tables.

For an order app, send the new order to the writer endpoint. Point a separate reporting connection at the reader endpoint when replicas are available and suitable. The reader endpoint chooses a database instance when the connection opens. A browser feature that needs to read an order immediately after writing it should use a path that meets its consistency needs instead of assuming every reader already reflects that write.

TopicRDS MySQL/PGAurora
StorageYou choose allocated GB (+autoscaling options)Auto-grows; pay for used space
ReplicaRead replica = often extra storage copyUp to 15 Aurora replicas, same volume
FailoverMulti-AZ standby (engine dependent)Typically faster promotion of a replica
CompatibilityCommunity MySQL / PostgreSQL enginesAurora MySQL / Aurora PostgreSQL wire-compatible
CostOften cheaper for small steady DBsHigher for small labs; shines at scale/HA

Ravindra Bagale's Tip

For a student blog with 1 GB data, RDS MySQL free-tier/dev instance is enough. Pick Aurora when you need its storage/replica model or company standard.

3. Serverless v2 (short)

Read capacity changes separately from the writer and reader roles. Aurora Serverless v2 adjusts eligible database instance capacity within the range you configure. An Aurora Capacity Unit, or ACU, represents a bundle of compute and memory capacity. Picture a reporting window that starts at a quiet capacity and then uses more resources during a busy query period. The connection still goes to an endpoint, and the workload still needs good queries and suitable indexes. Scaling changes available capacity without fixing a slow SQL statement by itself.

Aurora Serverless v2 scales ACU capacity up and down. Good for spiky or uncertain load. Still not “free when idle” like Lambda — know the minimum ACU you set.

Common errors: cause and safe next check

One reader stays busy while another is quiet

A reader endpoint spreads new connections, not every query inside an existing connection. A long-lived connection pool can keep sending work to the same reader. Inspect connection distribution before assuming the endpoint is broken; plan pool connection renewal with the application owner.

A write fails on a read-only connection

When replicas exist, a connection through the reader endpoint reaches a read-only replica. Check which endpoint the application uses. Keep the write path on the cluster writer endpoint rather than changing database protection to make a reader writable.

The app loses a connection during failover

An existing connection can break when its database instance becomes unavailable. Cluster endpoints identify the current writer, but they do not preserve an old connection. The app must reconnect and handle retry safely; do not blindly repeat a payment or order write.

Practical questions and full answers

Will adding readers make one long query run on all of them?

No. One connection is handled by one DB instance. Readers help distribute concurrent read connections; they do not split one SQL statement across all replicas through the reader endpoint.

Why should I avoid saving the current writer IP in my app?

The writer can change after failover. Use the cluster writer hostname and allow the client to resolve it when reconnecting. An IP copied today is not a stable promise about tomorrow’s writer.

Does a reader endpoint prove that a replica exists?

No. Aurora has a reader endpoint even when the cluster has only its primary instance. In that case it connects to the primary, so its presence alone does not show separate read capacity. Check the cluster member list.

4. Interview angles

Q. MySQL compatible?

Aurora MySQL speaks the MySQL wire protocol (version matters).

Q. Storage growth unit?

Typically 10 GB increments.

Q. Writer vs reader endpoint?

Writer for writes; reader endpoint load-balances readers.

Q. When RDS over Aurora?

Small/simple/cheaper labs; exact community engine needs.

Q. Backup?

Continuous backups to S3 + snapshots — similar habit to RDS.

Try at home

  1. Price a db.t3.medium RDS MySQL vs Aurora MySQL in ap-south-1 for 1 month (docs calculator).
  2. Next chapter: create and delete an Aurora cluster.

In short

  1. Aurora = MySQL/PG compatible, cloud-native storage.
  2. Replicas share storage; failover is a strength.
  3. Costs more than tiny RDS for small labs.
  4. Always delete lab clusters.

Read and write endpoints have different jobs

Put a single update through a cluster writer endpoint and make a separate read through the reader endpoint. A reader endpoint balances connections, so an already open connection does not choose a different instance for every query.

Interview check Does changing the writer require a hard-coded instance address?

Use the cluster writer endpoint so it follows the writer role across failover. Clients still need sensible retry and reconnection behavior.

Reference documentation

Practise this chapter

Interview questions and answers

A reporting workload stayed on one Aurora reader after you added a second. What would you look at?

I would verify that the application uses the reader endpoint and inspect where its connections landed. The endpoint balances new connections, so an existing connection pool may continue using an old reader. I would compare pool behavior and query load before suspecting the table or endpoint.

Check your understanding

Choose an answer, then compare your reasoning with the explanation.

0 of 3 answered correctly
1. Which endpoint should the order application use for INSERT in the normal Aurora design?

Answer and explanation

C. The writer cluster endpoint

Use the writer endpoint for changes. A reader connection can be read-only when replicas exist.

2. What does the reader endpoint balance when there are suitable Aurora replicas?

Answer and explanation

A. New connections

Each connection reaches one database instance. A long-lived connection keeps using that instance.

3. What changes when a Serverless v2 instance scales?

Answer and explanation

C. The database instance capacity within its configured range

Capacity scaling changes the resources available to the DB instance. It does not rewrite queries or schema.

Plan a writer and reader connection test

Before you start

  • Use the sample endpoint roles below. If using an approved disposable cluster, apply the setup and cleanup instructions in classroom chapter 100.
  1. Write a client plan with order intake, order confirmation and monthly reports. The sample cluster has one writer and two replicas. Choose the appropriate endpoint for the write and for reports.

    Expected result: Order intake uses the writer endpoint. Read-only reports can use the reader endpoint if the acceptable data freshness allows it.

  2. Read this sample connection distribution: an existing report connection is on Reader A, a new one lands on Reader B. Decide whether a second SQL statement on the old connection should move automatically.

    Expected result: It stays on Reader A for that connection. The endpoint selects a destination at connection time.

  3. Plan a fresh sample INSERT and SELECT using one lab order ID. Then plan the read at the reporting endpoint and list the evidence that differentiates connection success from immediate read consistency.

    Expected result: The writer query checks the just-inserted row on the writer. The reporting query confirms its own accessible connection and whether the read already observes the write.

If the result differs

  • Check actual cluster members. A reader endpoint on a cluster with no replicas can lead to the writer.

Finish and clean up

  • The tabletop version creates nothing. If you use a lab cluster, remove the test and retire the cluster or keep only the approved backup as explained in chapter 100.

Practice Tasks

Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.

About this scenario

Thane Housing Society is a real estate business in Thane. Mahesh Patwardhan looks after its IT and cloud work. They count money in INR and run their AWS resources in the ap-south-1 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.

0 / 12

Easy Biggest orders first

Querying the database is daily work after you set up RDS.

Show order id and amount, biggest amount first.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Easy Filter customers by city

Querying the database is daily work after you set up RDS.

List the names of customers in Pune.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Easy Find the database endpoint

Your app connects using the endpoint name, not an IP.

Describe DB instance thanehousing-db.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Medium Total sales

Querying the database is daily work after you set up RDS.

Show the total of all order amounts as one number.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Medium Orders with customer names

Querying the database is daily work after you set up RDS.

Show each customer name with each order amount.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Medium Remove small orders

Querying the database is daily work after you set up RDS.

Delete orders with amount below 200.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Medium Fix a city

Querying the database is daily work after you set up RDS.

Customer 5 moved to Rome. Update the record.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Medium Turn on Multi-AZ

Multi-AZ keeps a standby copy in another AZ and fails over automatically.

Modify thanehousing-db to be Multi-AZ and apply the change immediately.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Sales per customer

Querying the database is daily work after you set up RDS.

Show customer_id and total amount per customer, only where total is above 1000.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Hard Customers with no orders

Querying the database is daily work after you set up RDS.

List names of customers who have never ordered.

Tables: customers(id, name, city) and orders(id, customer_id, amount, odate).

  1. Find the table the task is about (see the table list above the box).
  2. Write the SQL statement step by step: what, from where, which rows.
  3. End the statement with ;
  4. Click Check answer. Your query runs on a practice copy of the table.

Hard Create a MySQL database

RDS runs the database for you: backups, patches and failover are managed.

Create RDS instance thanehousing-db: engine mysql, class db.t3.micro, 20 GiB storage, master user admin, master password from $DB_PASS.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Hard Create a read replica

Read replicas take report and read traffic off the main database.

Create read replica thanehousing-db-ro from source thanehousing-db.

  1. Read the task and decide which AWS service it is about.
  2. Write aws, then the service name, then the operation (the action word).
  3. Add each needed flag (--name) followed by its value from the task.
  4. Flags can be in any order. Click Check answer.

Revision, comparison and interview cards

Revise this lesson in a few minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens this lesson.

Revision card: What is Amazon Aurora?. Teams want MySQL/PostgreSQL compatibility with cloud-native storage that grows and replicas that stay fast. Amazon Aurora is a managed relational engine compatible with MySQL or PostgreSQL, with a distributed storage layer that auto-grows. Pick Aurora MySQL-Compatible or PostgreSQL-Compatible when creating the cluster; apps use nearly the same drivers. mysql client connects to the cluster endpoint and runs SELECT 1 like RDS MySQL.
Revision card: What is Amazon Aurora? · Download PNG · Open card page
Revision card: Aurora vs RDS MySQL/PG. Aurora costs more per hour than small RDS — you need a reason. Aurora shines on storage growth, replica lag, and failover design. Plain RDS MySQL/PG is simpler and often cheaper for small apps. Choose Aurora when read scale and fast failover matter; choose RDS for tiny labs and steady small DBs. A blog with 1 GB data may stay on RDS; a read-heavy catalog may move to Aurora replicas.
Revision card: Aurora vs RDS MySQL/PG · Download PNG · Open card page
Revision card: Aurora Serverless v2. Dev databases that sit idle all night waste fixed instance hours. Aurora Serverless v2 scales capacity in ACU units with the load within min/max you set. Create Aurora Serverless v2 with a low minimum ACU for labs; raise max only if needed. Idle evening traffic drops ACUs toward the minimum instead of a full always-on instance size.
Revision card: Aurora Serverless v2 · Download PNG · Open card page
Comparison: Amazon Aurora vs RDS MySQL / PostgreSQL. Amazon Aurora: Cloud-native storage auto-grows; strong replica/failover story. RDS MySQL / PostgreSQL: Classic managed engine on instance storage model.
Comparison: Amazon Aurora vs RDS MySQL / PostgreSQL · Download PNG · Open card page
Interview card: Is Aurora “just RDS MySQL”?. Aurora is MySQL- or PostgreSQL-compatible with a different storage architecture. Storage auto-grows and replica/failover behaviour differs from classic RDS engines. Apps use similar drivers against the cluster endpoint; pick Aurora MySQL or Aurora PostgreSQL engine.
Interview card: Is Aurora “just RDS MySQL”? · Download PNG · Open card page
Interview card: When is Aurora worth the cost?. When you need cloud-native storage growth, fast replicas, and strong failover for MySQL/PG workloads. Tiny quiet databases often stay cheaper on RDS MySQL/PostgreSQL. Read-heavy catalog with Aurora replicas; student 1 GB blog on RDS.
Interview card: When is Aurora worth the cost? · Download PNG · Open card page

More cards: Ravi Sir's Cards.