Lab 6 1: Build a Database Server - nicolas-tullio/Tech-Journal GitHub Wiki

Deliverables

Screenshot of address book with contacts including your name or other identifying info

image

Steps

Create a Security Group for the RDS DB Instance

Select VPC > Security groups

image

Choose Create security group and then configure:

  • Security group name: DB Security Group

  • Description: Permit access from Web Security Group

  • VPC: Lab VPC

image

Choose Add rule and configure the following settings:

  • Type: MySQL/Aurora (3306)

  • Source: Place you cursor in the field to the right of Custom, type sg, and then select Web Security Group.

image

Choose Create security group

image

Create a DB Subnet Group

Select RDS > Subnet groups

image

Choose Create DB Subnet Group then configure:

  • Name: DB-Subnet-Group

  • Description: DB Subnet Group

  • VPC: Lab VPC

image

Add subnets

image

Choose Create

image

Create an Amazon RDS DB Instance

Select RDS > Databases

Choose Create database

Select MySQL under Engine Options.

image

Under Templates choose Dev/Test

image

Under Availability and durability choose Multi-AZ DB instance

image

Under Settings, configure:

  • DB instance identifier: lab-db

  • Master username: main

  • Master password: lab-password

  • Confirm password: lab-password

image

Under DB instance class, configure:

  • Select Burstable classes (includes t classes).

  • Select db.t3.micro

image

Under Storage, configure:

  • Storage type: General Purpose (SSD)

  • Allocated storage: 20

image

Under Connectivity, configure:

  • Virtual Private Cloud (VPC): Lab VPC

image

Under Existing VPC security groups, from the dropdown list:

  • Choose DB Security Group.

  • Deselect default.

image

Under Monitoring expand Additional configuration.

  • Uncheck Enable Enhanced monitoring.

image

Under Additional configuration, configure:

  • Initial database name: lab

  • Uncheck Enable automatic backups.

  • Uncheck Enable encryption

  • This will turn off backups, which is not normally recommended, but will make the database deploy faster for this lab.

image

Choose Create database and wait for it to complete

image

Wait until Status changes to Modifying or Available

image

Scroll down to the Connectivity & security section and copy the Endpoint field

lab-db.cq7xrz1l0ydf.us-east-1.rds.amazonaws.com

Interact with Your Database

To discover the WebServer IP address, choose on the AWS Details drop down menu above the lab instructions. Copy the IP address:

54.237.240.37

Open a new web browser tab, paste the WebServer IP address and press Enter

image

Choose the RDS link at the top of the page

image

Configure the following settings:

  • Endpoint: lab-db.cq7xrz1l0ydf.us-east-1.rds.amazonaws.com

  • Database: lab

  • Username: main

  • Password: lab-password

  • Choose Submit

image

Test the web application by adding, editing and removing contacts

image