Build DB Server
Build DB Server
Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate,
and scale a relational database in the cloud. It provides cost-efficient and
resizable capacity while managing time-consuming database administration tasks,
which allows you to focus on your applications and business. Amazon RDS provides
you with six familiar database engines to choose from: Amazon Aurora, Oracle,
Microsoft SQL Server, PostgreSQL, MySQL and MariaDB.
Objectives
Duration
Scenario
Troubleshooting tip: If you get an "Access Denied" error, close the error box and
choose Start Lab again.
A red circle next to AWS at the top left corner of this page indicates the lab has
not been started.
A yellow circle next to AWS at the top left corner of this page indicates the lab
is starting.
A green circle next to AWS at the top left corner of this page indicates the lab
is ready.
At the top of these instructions, choose the green circle next to AWS
This will open the AWS Management Console in a new browser tab. The system will
automatically log you in.
Tip: If a new browser tab does not open, there will typically be a banner or icon
at the top of your browser indicating that your browser is preventing the site from
opening pop-up windows. Click on the banner or icon and choose "Allow pop ups."
Arrange the AWS Management Console tab so that it displays along side these
instructions. Ideally, you will be able to see both browser tabs at the same time,
to make it easier to follow the lab steps.
In the AWS Management Console, select the Services menu, and then select VPC under
Networking & Content Delivery.
You will now add a rule to the security group to permit inbound database requests.
The security group currently has no rules. You will add a rule to permit access
from the Web Security Group.
Source: Type sg in the search field and then select Web Security Group.
This configures the Database security group to permit inbound traffic on port 3306
from any EC2 instance that is associated with the Web Security Group.
Scroll to the bottom of the screen, then click Create security group
You will use this security group when launching the Amazon RDS database.
In the AWS Management Console, select the Services menu, and then select RDS under
Database.
In the Add subnets section for Availability zones, click the , then:
Click Create
This adds Private Subnet 1 (10.0.1.0/24) and Private Subnet 2 (10.0.3.0/24). You
will use this DB subnet group when creating the database in the next task.
Amazon RDS Multi-AZ deployments provide enhanced availability and durability for
Database (DB) instances, making them a natural fit for production database
workloads. When you provision a Multi-AZ DB instance, Amazon RDS automatically
creates a primary DB instance and synchronously replicates the data to a standby
instance in a different Availability Zone (AZ).
If you see Switch to the new database creation flow at the top of the screen,
please click it.
Under the Engine options section, for Engine type, choose MySQL.
Select db.t3.medium.
Under Monitoring, expand Additional configuration and then configure the following:
Scroll down to the Additional configuration section and expand this option. Then
configure:
This will turn off backups, which is not normally recommended, but will make the
database deploy faster for this lab.
You will now need to wait approximately 4 minutes for the database to be available.
The deployment process is deploying a database in two different Availability zones.
Note: If you are prompted with the Suggested add-ons for lab-db window, choose
Close
While you are waiting, you might want to review the Amazon RDS FAQs or grab a cup
of coffee.
Wait until the Status changes to Modifying or Available.
Scroll down to the Connectivity & Security section and copy the Endpoint field.
Paste the Endpoint value into a text editor. You will use it later in the lab.
Copy the WebServer IP address by selecting i AWS Details above these instructions
you are currently reading.
Open a new web browser tab, paste the WebServer IP address and press Enter.
The web application will be displayed, showing information about the EC2 instance.
At the top of the web application page, click the RDS link.
Database: lab
Username: main
Password: lab-password
Click Submit
A message will appear explaining that the application is running a command to copy
information to the database. After a few seconds the application will display an
Address Book.
The Address Book application is using the RDS database to store information.
The data is being persisted to the database and is automatically replicating to the
second Availability Zone.