Activity 1
- Scenario: Your application is using MySQL, The application is configured to have high web requests which would lead to high database calls, We are asked to create an RDS mysql Instance with Automatic failover. This database is migrated from on-premises and it used to have 8 GB of RAM and 2 vCPUs. The I/O operations should be faster.The size of the data is around 80 GB and is expected to grow till 200 GB
- Solution:
- For automatic failover => Multi AZ
- RDS Engine type => MySQL
- Right DB instance size: We will be choosing standard instance types t4g.large, db.m6g.xlarge or db.m5.xlarge (For practice you can still use db.t2.micro)
- Storage Speed => Provisioned IOPS: For this practical exercise use General purpose with 20 GB, but for enterprise use the below settings

- Working Steps:
- Make a note of VPC ID: vpc-0232cbe7cadd18042
- Create a security group which opens 3306 port: mysql, sg-034f65bf200df257d

- Create a DB Subnet group with AZ a,b
=> mysql - Database should not be accesible over internet
- Ensure we have backups for 7 days and backup windows is 1:00 AM IST
- Ensure no minor version upgrades are allowed
- Create using CLI/Console
aws rds create-db-instance --db-instance-identifier 'qt-ecommerce-db'--allocated-storage 100 --db-instance-class 'db.m6g.xlarge' --engine 'mysql' --master-username 'root' --master-user-password 'rootroot' --vpc-security-group-ids 'sg-034f65bf200df257d' --db-subnet-group-name 'mysql' --multi-az --backup-retention-period 7 --preferred-backup-window '19:30-20:00' --no-publicly-accessible --storage-type 'io1' --max-allocated-storage 200 --no-auto-minor-version-upgrade --iops 5000- This database will be accessible to the applications in the same network (VPC). IF the database admins want to login into rds from on-premises it is not possible directly we need to login via ssh-tunneling
