Now that we have a VPC to place our resources into, we will create a database for the backend of our web application. Our database will start off very simple: just a single RDS instance to support the initial deployment of our app. Future labs will build on this database to add additional functionality.
Estimated time to complete: 30 minutes
Cost: RDS incurs a cost. Consult the RDS Pricing Website for complete information.
Before we can deploy an RDS instance, it helps to have a defined security group to allow MySQL traffic.
Perform the following from the VPC console.
- Create a security group with the following attributes:
- Name tag: Lab Allow MySQL
- Group name: Lab Allow MySQL
- Description: Provide something descriptive for the security group
- VPC: specify your lab VPC
- Edit the inbound rules of the newly created security group:
- Allow MySQL/Aurora traffic from your public lab subnet: 10.10.100.0/24
Perform the following from the RDS console.
- Create a new Subnet group with the following attributes:
- Name: lab-subnet-group
- Description: Provide something descriptive for your subnet group
- VPC ID: Specify the Lab VPC created earlier
- Add both private subnets to the group
Perform the following from the RDS console.
- Launch an RDS instance with the following attributes:
- Engine: MySQL
- DB instance class: db.t2.micro
- No multi-AZ
- Leave remaining settings at their defaults
- Set the instance identifier to "lab-db"
- Set the username and password to your desired values
- Be sure to write down this information
- Configure the Advanced Settings with the following attributes:
- Network & Security
- Set the VPC to your Lab VPC
- Specify the subnet group created previously
- Specify the same availability zone as the AZ created for your public subnet
- Specify the security group created previously
- Publicly accessible - no
- Network & Security
- Configure the database name as "testapp"
- Leave the remaining settings at their default values
Document the information below about your environment. This documentation will be useful during later labs.
RDS Instance Identifier | Endpoint | Master Username | Master Password |
---|---|---|---|
lab-db | lab-db.xxxxxxxxxxxx.us-east-1.rds.amazonaws.com |
Be sure to keep the master username and password private
You will incur fees if you do not terminate the RDS instance created during this lab. The teardown process is below.
- Delete the RDS instance from the RDS console.
-
What is a DB subnet group?
-
What is multi-AZ? Is it used for increased capacity or availability? Are there different endpoints for each database instance in a multi-AZ configuration?
-
There was an option for configuring a parameter group. This option was left at its default value. Explain what a parameter group is.
-
Do you have any access to the underlying operating system of an RDS instance?