> ## Documentation Index
> Fetch the complete documentation index at: https://cloud-architect.ipoint-labs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to AWS Relational Database Service

> Hands-on lab · 50m

Launch this lab in the IP Lab Portal, then follow the steps below in the AWS console.

<a className="ip-lab-portal-btn" href="https://labs.intellectualpoint.com/labs/introduction-to-aws-relational-database-service" target="_blank" rel="noreferrer">
  Open IP Lab Portal
</a>

## 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

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/001.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=caef454ff235443c3cb3c33b0d93eab6" alt="" width="800" height="840" data-path="images/labs/introduction-to-aws-relational-database-service/001.png" />

### 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](https://dev.mysql.com/downloads/workbench/). Based on your OS, select the respective option under **Generally Available (GA) Releases**. Download and Install.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/002.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=c81a8e217bf8a132df089dc4368b2183" alt="" width="489" height="211" data-path="images/labs/introduction-to-aws-relational-database-service/002.png" />

### 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**.

<Note>
  You can only start one lab at any given time
</Note>

## 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

     <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/003.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=b9a4370c2ef44e0729a38514abe71198" alt="" width="1222" height="648" data-path="images/labs/introduction-to-aws-relational-database-service/003.png" />

* Click on the **Add Rule** button under **Inbound rules.**

  * Type: Select **MYSQL/Aurora**
  * Source: Select **Anywhere Ipv4**

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/004.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=665f42a768b8ccecae9245fa78458eeb" alt="" width="1222" height="162" data-path="images/labs/introduction-to-aws-relational-database-service/004.png" />

6. Leave everything as default and click on the **Create Security Group** button.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/005.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=01f0778be3135cdfec2fedd458ddc715" alt="" width="1222" height="545" data-path="images/labs/introduction-to-aws-relational-database-service/005.png" />

#### 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**

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/006.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=d7568e6edab3200ea7055db5a1e4786c" alt="" width="1851" height="191" data-path="images/labs/introduction-to-aws-relational-database-service/006.png" />
* Engine options : Select **MySQL**
* Version : **Default**

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/007.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=d25d38e1fbe07baa2126fa07042b6947" alt="" width="1610" height="1156" data-path="images/labs/introduction-to-aws-relational-database-service/007.png" />
* 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.**

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/008.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=9444b44e15d4094561a4bec639bfec2b" alt="" width="2830" height="1192" data-path="images/labs/introduction-to-aws-relational-database-service/008.png" />
* 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.***

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/009.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=951e9514fc0929324ecae0dd6ea0b747" alt="" width="1610" height="1056" data-path="images/labs/introduction-to-aws-relational-database-service/009.png" />
* DB instance class : **db.t3.micro — 2 vCPU, 1 GiB RAM**

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/010.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=8e9a7aeb5d2f888a87d6d6aa714128f3" alt="" width="1610" height="780" data-path="images/labs/introduction-to-aws-relational-database-service/010.png" />
* 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**

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/011.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=c1333d4b708484ff8e19eae5668d16ef" alt="" width="807" height="732" data-path="images/labs/introduction-to-aws-relational-database-service/011.png" />
* Public access : Select **Yes**
* VPC security groups **: Select Choose existing**

  **Note: Remove the default one and select RDS\_lab\_sg instead**

  <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/012.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=ccd08d43820a870400743150188376b8" alt="" width="1612" height="852" data-path="images/labs/introduction-to-aws-relational-database-service/012.png" />
* 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**

    <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/013.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=5f43010dd6b2a1a1288c4bd63bab4acd" alt="" width="1740" height="804" data-path="images/labs/introduction-to-aws-relational-database-service/013.png" />
  * **Note: Leave all the other setting as default**
* Click on **Create database**

5. Navigate to **Databases.**
6. 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**.

   <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/014.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=2dd1cdbf1da3d56b6a1f4bad4e99d202" alt="" width="1002" height="157" data-path="images/labs/introduction-to-aws-relational-database-service/014.png" />

#### 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**

       <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/015.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=5856e5673e7ceea6f353a4f854307544" alt="" width="1222" height="591" data-path="images/labs/introduction-to-aws-relational-database-service/015.png" />
     * 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.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/016.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=7ea10af29ebd80a8a04e0dff9ad8aab4" alt="" width="784" height="488" data-path="images/labs/introduction-to-aws-relational-database-service/016.png" />

* Click on **Test Connection** to make sure that you are able to connect to the database properly.

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/017.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=06e75223499ccea34134c8355a49f1f3" alt="" width="371" height="281" data-path="images/labs/introduction-to-aws-relational-database-service/017.png" />

* Click on ok and ok again to save the connection.

3. A database connection will be created in MySQL Workbench

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/018.png?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=ce6b4d998f9a7bc8f9be643208a8a994" alt="" width="241" height="94" data-path="images/labs/introduction-to-aws-relational-database-service/018.png" />

4. Click on it to open the database. Enter the database password if prompted.

5. After successfully connecting and opening the database, you can create tables and perform various queries over the connected database.

   <img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/019.jpg?fit=max&auto=format&n=f-UHpNVYYLl5zeE0&q=85&s=8d253db554a343f59a7ca187204669cd" alt="" width="662" height="474" data-path="images/labs/introduction-to-aws-relational-database-service/019.jpg" />

6. Navigate to the **Schemas** tab to see databases available to start doing database operations. More details on database operations are available [here](https://dev.mysql.com/doc/).

<Tip>
  **Do you know?**

  **AWS RDS** supports the integration of geospatial data, allowing you to store, query, and analyze location-based information efficiently.
</Tip>

#### 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 :

<img src="https://mintcdn.com/ip-cloud-architect-pathway/f-UHpNVYYLl5zeE0/images/labs/introduction-to-aws-relational-database-service/020.gif?s=e6affb625801733c132b25f9ecf62553" alt="" width="1000" height="586" data-path="images/labs/introduction-to-aws-relational-database-service/020.gif" />

### 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

## Related help

* [FAQs and Troubleshooting](/aws-cp/support/faqs-and-troubleshooting)
