Deploying Amazon RDS Multi-AZ and Read Replica, Simulate Failover

Lab Details

  1. This lab walks you through the steps to launch an Amazon Aurora RDS DB instance with multi-AZ enabled. We will also simulate a database failover from one AZ to another.

  2. You will practice using Amazon Aurora.

  3. Duration: 1 hour

  4. AWS Region: US East (N. Virginia) us-east-1


What is Amazon RDS?

Amazon RDS

  1. Amazon Relational Database Service (Amazon RDS)  is a Relational Database service that offers high availability and throughput.

  2. Amazon RDS comes with great features that include Multi-AZ feature and Read Replica that ensures no data loss.

  3. Amazon RDS also provides you high scalability where you can scale up and scale down depending on your needs.

  4. Amazon RDS provides you with six familiar database engines which include MySQL, Amazon Aurora, PostgreSQL, MariaDB, Oracle Database and SQL Server.


  1. Multi-Availability zone ( Multi-AZ ) is a feature that comes with Amazon RDS that  provides you with high availability and durability for Database instances.

  2. When we are opting for the Multi-AZ database instance, it will automatically create a Primary DB instance and parallelly replicate the data to the standby instances in different availability zones in that region. However, we can't access the standby instances, unlike primary instances.

  3. The main purpose of Multi-AZ is to provide a failover option for primary RDS instances.

  4. Amazon RDS uses the Failover mechanism for Oracle, MYSQL, MariaDB and PostgreSQL instances.

  5. The RDS Failover process happens automatically and is managed by AWS  without human intervention.

  6. Amazon RDS uses the concept of SQL Mirroring for Replicating data to standby instances in the different availability zones and both primary and standby instances use the same endpoint.

Reasons for Failover

  • The failover process will take place due to one of the following reasons occurring in the primary instances:

  • Host Failure 

  • DB instance class modification.

  • Instance rebooting

  • Availability zone failure

  • RDS maintenance     

Conditions for enabling Multi-AZ on RDS

  • minimum of two different availability zones should be present in a DB subnet group where you are launching your Primary DB instance.

Amazon Aurora and Read Replica

  • Amazon Aurora is the DB instance, which is a little different when comparing to the above-mentioned Instance types.

  • Aurora uses the concept of a DB cluster where the primary instance replicates its data across different availability zones.

  • In the case of a primary instance failure, Aurora automatically launches its primary instance from the replicated instance in a different availability zone.

  • Multi-AZ on Aurora clusters makes RDS replicate or provision a replica of the master database to a different availability zone within a Region.


  1. In this lab session, first we are going to launch an Amazon Aurora RDS DB instance with Multi-AZ enabled.

  2. Connect to the RDS database instance (using its endpoint) from your local machine.

  3. Create a test database and table in your Master RDS DB instance.

  4. Force the Master DB instance to failover.

  5. After Failover, Master will change to Reader and Reader will change to Master

  6. Connect to the new Master to test the database replication.

Architecture Diagram


Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses