Day 44: Relational Database Service in AWS

Day 44: Relational Database Service in AWS

Amazon Relational Database Service (Amazon RDS) is a collection of managed services that makes it simple to set up, operate, and scale databases in the cloud

Task-01

  • Create a Free tier RDS instance of MySQL

  • Create an EC2 instance

  • Create an IAM role with RDS access

  • Assign the role to EC2 so that your EC2 Instance can connect with RDS

  • Once the RDS instance is up and running, get the credentials and connect your EC2 instance using a MySQL client.

Let’s begin with task 1

Steps to Create RDS Instance of MySQL

  1. Login to AWS Console and search for "RDS".

  2. Click on "RDS" and navigate to the RDS dashboard.

  3. Create a database using the "Standard create" method and select "MySQL" under Engine options.

  4. Select "Free Tier" under Templates.

  5. Configure settings:

    • DB instance identifier: mydatabase-1

    • Master username: manager

    • Provide a password

  1. Configure additional settings like storage, backups, VPC, and security groups.

  2. Review and create the database. This process may take a few minutes.

  3. Create an EC2 instance named RDS.

  4. Configure the security group to allow inbound traffic on the MySQL port (default is 3306).

  5. Create an IAM role with RDS access and assign it to the EC2 instance.

    Click on create role

  6. Copy the RDS instance endpoint and other details.

  7. Connect to the EC2 instance using SSH.

  8. Install the MySQL client on the EC2 instance:

sudo apt-get update
sudo apt-get install mysql-client
mysql --version

  1. Connect to the RDS instance using the MySQL client:
mysql -h <RDS_ENDPOINT> -P <RDS_PORT> -u <MASTER_USERNAME> -p

Thankyou for reading !!!!!