Skip to main content
Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console. Open IP Lab Portal

Overview

Lab details

  1. This lab walks you through to the creation and testing of an Amazon Relational Database Service (Amazon RDS) database. We will create an RDS MySql Database and test the connection using MySQL Workbench.
  2. Duration: 50 minutes
  3. AWS Region: US East (N. Virginia) us-east-1

Introduction

What is Relational Database Service ?

  • Amazon RDS is a fully managed relational database service that allows users to quickly set up, operate, and scale databases in the AWS cloud. AWS handles time-consuming administrative tasks such as hardware provisioning, software installation, patching, automated backups, monitoring, and recovery, enabling users to focus on building and managing their applications rather than maintaining database infrastructure.
  • It supports multiple relational database engines including MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, and Amazon Aurora. It provides built-in features like high availability with Multi-AZ deployments, automated backups, security through encryption and access control, and easy scalability to meet application performance and storage requirements.

Architecture diagram

Task details

  1. Sign in to AWS Management Console
  2. Create a Security Group for RDS Instance
  3. Create RDS Database Instance
  4. Connecting to RDS Database on a DB Instance using the MySQL Workbench
  5. Validation of the lab

Prerequisites

  1. For testing this lab, it is necessary to download the MySql GUI Tool, To download it, go to the Download MySQL Workbench page. Based on your OS, select the respective option under Generally Available (GA) Releases. Download and Install.

Launching the lab environment

  1. To launch the lab environment, Click on the Launch lab button.
  2. Please wait until the cloud environment is provisioned. It will take less than a minute to provision.
  3. Once the Lab is started, you will be provided with IAM user name, Password, Access Key, and Secret Access Key.
You can only start one lab at any given time

Lab guide

Lab steps

Task 1: Sign in to AWS Management Console

  1. Click on the Open console button, and you will get redirected to AWS Console in a new browser tab.
  2. On the AWS sign-in page,
    • Leave the Account ID as default. Never edit/remove the 12 digit Account ID present in the AWS Console. otherwise, you cannot proceed with the lab.
    • Now copy your User Name and Password in the Lab Console to the IAM Username and Password in AWS Console and click on the Sign in button.
  3. Once Signed In to the AWS Management Console, Make the default AWS Region as US East (N. Virginia) us-east-1.

Task 2 : Create a Security Group for RDS instance

  1. Make sure you are in the N.Virginia Region.
  2. Navigate to EC2 by clicking on the Services menu available under the Compute section.
  3. On the left panel menu, select the security group under the Network & Security section.
  4. Click on the Create Security Group.
  5. We are going to create a Security group for RDS with a 3306 port number enabled.
    • Security group name : Enter RDS_lab_sg
    • Description: Enter Security group for RDS
    • VPC: Select Default VPC
  • Click on the Add Rule button under Inbound rules.
    • Type: Select MYSQL/Aurora
    • Source: Select Anywhere Ipv4
  1. Leave everything as default and click on the Create Security Group button.

Task 3 : Create RDS Database Instance

  1. Make sure you are in the US East (N. Virginia) us-east-1 Region.
  2. Navigate to Aurora and RDS by clicking on the Services menu available under the Database section.
  3. Click on Create Database.
  • Database creation method : Full configuration
  • Engine options : Select MySQL
  • Version : Default
  • Templates : Select Free Tier and Availability and durability as Single-AZ DB instance deployment (1 instance) Note: Selecting the Free Tier as a template is compulsory, else database won’t be created.
  • DB instance identifier : mydatabaseinstance
  • Credentials management: Select Self managed
  • Master username : mydatabaseuser
  • Master password and Confirm password: mydatabasepassword Note: This is the username/password combo used to log onto your database. Please make note of them somewhere safe.
  • DB instance class : db.t3.micro — 2 vCPU, 1 GiB RAM
  • Storage type : General Purpose SSD (gp3).
    Note: By default, it will be gp2, kindly change to gp3.
  • Allocated storage : 20 (default)
  • Click on Additional storage configuration to expand.
  • Enable storage autoscaling : Uncheck
  • Public access : Select Yes
  • VPC security groups : Select Choose existing Note: Remove the default one and select RDS_lab_sg instead
  • Click on Additional Configuration in the bottom of the page to expand it:
    • Initial database name: mydatabase
    • DB parameter group: default
    • Option group: default
    • Enable automated backups: uncheck
    • Note: Leave all the other setting as default
  • Click on Create database
  1. Navigate to Databases.
  2. On the RDS console, the details for the new DB instance appear. The DB instance has a status of creating until the DB instance is ready to use. When the state changes to Available, you can connect to the DB instance. It can take up to 20 minutes before the new instance status becomes Available.

Task 4 : Connecting to RDS Database on a DB Instance using the MySQL Workbench

In this task, we will connect to a database on a MySQL DB instance using MySQL monitor commands. One GUI-based application you can use to connect is MySQL workbench, which you have already downloaded and installed based on instructions in the prerequisite section.
  1. To connect to a database on a DB instance using MySQL monitor, find the endpoint (DNS name) and port number for your DB Instance.
    • Navigate to Databases and click on mydatabaseinstance**.**
    • Under Connectivity & security section, copy and note the endpoint and port.
      • Endpoint: Copy the endpoint
      • Port: 3306
      • You need both the endpoint and the port number to connect to the DB instance.
  2. Open MySQL Workbench. Click on the plus icon aside on MySQL Connections
    • Connection Name: Enter a sample name MyDatabseConnection
    • Host Name: Past the Endpoint that you copied
    • Port : 3306
    • Username : mydatabaseuser
    • Password : Click on Store in keychain and enter password mydatabasepassword Click on ok.
  • Click on Test Connection to make sure that you are able to connect to the database properly.
  • Click on ok and ok again to save the connection.
  1. A database connection will be created in MySQL Workbench
  1. Click on it to open the database. Enter the database password if prompted.
  2. After successfully connecting and opening the database, you can create tables and perform various queries over the connected database.
  3. Navigate to the Schemas tab to see databases available to start doing database operations. More details on database operations are available here.
Do you know?AWS RDS supports the integration of geospatial data, allowing you to store, query, and analyze location-based information efficiently.

Task 5 : Validation Test

  1. Once the lab steps are completed, please click on the Check my work button on the left side panel.
  2. This will validate the resources in the AWS account and displays whether you have completed this lab successfully or not.
  3. Sample output :

Completion and conclusion

  1. You have successfully used AWS management console to create RDS MySQL database instance.
  2. You have configured the details while creating the Amazon RDS instance.
  3. You have used the GUI tool MySQL Workbench to connect to the Amazon RDS instance created.

End lab

  1. Sign out of AWS Account.
  2. You have successfully completed the lab.
  3. Once you have completed the steps, click on End lab in the IP Lab Portal and wait till the process gets completed.

What gets checked

When you press Check my work, the platform verifies each of these:
  • Launch RDS instance — Check whether an RDS Instance is created or not