This lab walks you through creating and monitoring Resilient System Architecture Using EC2, RDS Multi-AZ, CloudWatch and SNS.
You will practice this lab using the services Amazon EC2, Amazon RDS, Amazon VPC, CloudWatch and SNS.
Duration: 2 hours
AWS Region: US East (N. Virginia) us-east-1
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.
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.
The failover process will take place due to one of the following reasons occurring in the primary instances:
DB instance class modification.
Availability zone failure
A minimum of two different availability zones should be present in a DB subnet group where you are launching your Primary DB instance.
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.
Log into the AWS Management Console.
Create a VPC
Create and configure Internet Gateway
Create public and private subnets.
Create a Public and Private Route Table
Create a security group for EC2 and RDS
Create a subnet group for RDS
Launching an EC2 instance
Create a RDS database instance
Configuring cloudwatch metrics and adding a subscription
SSH into the instance
Triggering cloudwatch alarm for EC2 instance hardware failure
Creating SNS subscription for RDS failover
Validation of the lab
Clean up AWS resources.