Support Documents
No data found.

Building a Resilient AWS Architecture to withstand hardware failovers and get notified using SNS from scratch

Lab Details

  1. This lab walks you through creating and monitoring  Resilient System Architecture Using EC2, RDS Multi-AZ, CloudWatch and SNS.

  2. You will practice this lab using the services Amazon EC2, Amazon RDS, Amazon VPC, CloudWatch and SNS.

  3. Duration: 2 hours

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


What is Amazon RDS?

Amazon RDS

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

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

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

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


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

  • 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.

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

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

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

  • 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.

What is EC2?

  • AWS defines it as Elastic Compute Cloud.

  • It’s a virtual environment where “you rent” to have your environment created, without purchasing. 

  • Amazon refers to these virtual machines as Instances.

  • Preconfigured templates can be used to launch instances. These templates are referred to as images. Amazon provides these images in the form of AMIs (Amazon Machine Images).

  • Allows you to install custom applications and services.

  • Scaling of infrastructure i.e., up or down is easy based on the demand you face.

  • AWS provides multiple configurations of CPU, memory, storage etc., through which you can pick the flavor that's required for your environment.

Architecture Diagram

Task Details

  1. Log into the AWS Management Console.

  2. Create a VPC

  3. Create and configure Internet Gateway

  4. Create public and private subnets.

  5. Create a Public and Private Route Table

  6. Create a security group for EC2 and RDS

  7. Create a subnet group for RDS

  8. Launching an EC2 instance

  9. Create a RDS database instance

  10. Configuring cloudwatch metrics and adding a subscription

  11. SSH into the instance

  12. Triggering cloudwatch alarm for EC2 instance hardware failure

  13. Creating SNS subscription for RDS failover

  14. Validation of the lab

  15. Clean up AWS resources.