NET702: Lab 11 Build a Database Server

Task 1: Creating Security group for RDS DB Instance

Step 1: Open Vocareum -> Click on the lab -> My Work -> Start Lab. A pop-up window will appear and when it says, “Lab status: ready”, close the window -> Click on AWS tab on top right navigation bar.

Step 2: Click on “Services” -> Select “VPC” -> Click on “Security Groups” on the left navigation panel -> Click on “Create security group” and enter the security group name as “DB Security Group” , description as “Permit access from Web Security Group” and VPC as “Lab VPC”. -> Click on “Create security group” and click on “Close” button.

Step 3: Select “DB Security Group” -> Click on “Inbound rules” tab -> Click on “Edit inbound rules” -> Select “Add rule” button and enter the type as “MySQL/Aurora (3306)” and the CIDR, IP, Security Group or Prefix List as “sg” and then select the Web Security Group. -> Click on “Save rules” and select “Close”.

Task 2: Creating a DB Subnet Group

Step 1: Click on “Services” -> Select “RDS” -> Click “Subnet groups” from the left navigation panel -> Click on “Create DB Subnet Group” and enter the name as “DB-Subnet-Group” , description as “DB Subnet Group”, VPC as “Lab VPC”. -> Choose the “Availability zone” as the first availability zone -> Enter the subnet as “10.0.1.0/24” -> Click on “Add subnet”.

Step 2: On the existing screen add another subnet. Configure the availability zone to the second available zone, enter the subnet as “10.0.3.0/24” -> Click on “Add subnet” -> Click on “Create”.

Task 3: Creating an Amazon RDS DB Instance

Step 1: Click on “Databases” on the lest navigation panel -> Click on “Create Database” -> Select “MySQL” -> Under “Settings”  enter the DB instance identifier as “lab-db”, Master username as “master”, Master password as “lab-password” and Confirm password as “lab-password”.

Step 2: Under “DB instance size”, select “Burstable classes (includes t classes)” option -> Select db.t3.micro.

Step 3: Under “Storage” select the “Storage type” as “General Purpose (SSD)” and the “Allocated storage” as “20”.

Step 4: Under “Connectivity” section, select “Lab VPC” as Virtual Private Cloud (VPC) -> Dropdown the “Additional connectivity configuration” -> For “Existing VPC security groups” select the “DB Security Group” to highlight it in blue. -> Dropdown the “Additional configuration” and enter the “Initial database name” as “lab” -> Uncheck the “Enable automatic backups” and “Enable Enhanced monitoring” to deploy the database faster.

Step 5: Click on “Create database” -> Click “lab-db” under the “DB Identifier” column.

Step 6: Wait for 5 minutes or more, until the “Info” changes to “Modifying” or “Available” -> Click on “Connectivity & security” tab. Scroll down in the “Connectivity & security” section and copy the “Endpoint” field.

Task 4: Interacting with Database

Step 1: Go to Vocareum lab -> Click on “Details” and select “Show”. -> Copy the “WebServer IP address” and paste it in a web browser tab. ->Press “Enter”.  The web application will be displaced along with the information of EC2 instance.

Step 2: Click on “RDS” link on the top of the page next to the “AWS” logo.

Step 3: Paste the “Endpoint” details we copied earlier -> Enter the name of Database as “lab”, Username as “master” and Password as “lab-password” ->Click on “Submit”. Few seconds later an “Address Book” will be displayed in the application.

Step 4: We can “Add Contact”, “Edit Contact” and “Remove Contact” from the “Address Book”.

Reflection and Critical Thinking

In this lab, I learned how to deploy Amazon RDS database, configure the database to allow connects to the web server and interacting with database with a web application.

First, I created a security group which allows the web server to access the database instance. Then I created a DB subnet group which tells the RDS to use a set of subnets for the database. Then I had to follow few steps for creating the Amazon RDS DB Instance. Once the Instance was created, I copied the link in the Endpoint field. I went to the Vocareum to get the IP address of the Web Server and I copied and paste it in a web browser. I was then asked to enter the endpoint, username and password, which I did, and it signed me in. The application was displaying the Address book where there were 3 rows of users already recorded. I was also allowed permission to configure the Address book by deleting user’s details, adding users, editing the existing users, etc.

RDS is used to set up a database instance which can be managed and scaled in the cloud. It can also take snapshots of the database instance daily and retain transaction logs which is useful for recovery in case if anything goes wrong or the database gets deleted. It provides the users few database engines such as MySQL, Oracle, etc., which can be used while deploying the database file. Amazon RDS can scale horizontally and vertically, has a minimum downtime, has a good security system and also it is affordable.

Leave a comment

Design a site like this with WordPress.com
Get started