RDS Lab
This project requires a small MySQL RDS instance. This instance will be configured to run in Single-AZ mode. Follow these steps to create it.
Step 1: Create an RDS Security Group
- Open the Security Group Console
- Click on the Create Security Group button
In the dialog box fill in these settings:
Security group name: <your_name>-RDS
Description: RDS Security Group
VPC: (select your VPC)
With the dialog box still open, click on Add Rule, and fill in these details:
Type: MySQL
Source: Select Custom, then type in the name of your EC2 Security Group which should be <your_name>-EC2
- Click on the Create button
Step 2: Create a DB Subnet Group
Subnet Groups define the subnets that RDS instances are placed into when launched.
- Open the Subnet Group Console
- Click on the Create DB Subnet Group button
- On the Create DB Subnet Group screen, type in these settings and click Create
- Name: <your_name>-DBSG
- Description: My DBSG
- VPC ID: (your VPC)
- Availability Zone: ap-southeast-1a
- Subnet ID: (add both private Subnets. You can find the IDs here)
- Click the Add button next to Subnet ID
Step 3: Launch the RDS Instance
In this step you will launch the RDS instance and then create a DNS record.
Step 3.1: Launch the Instance
Open the RDS Console
Click on the Launch DB Instance button
On the Select Engine screen, choose the MySQL tab and click Select
On the Production? screen, select the Dev\/Test radio button
On the Specify DB Details page, specify these settings and click Next Step
DB Instance Class: db.t2.micro
Multi-AZ Deployment: No
DB Instance Identifier: <your_name>-RDS
Master Username: dbmaster
Master Password: 5T8390sdkd
On the Configured Advanced Settings tab, specify these settings and click the Launch DB Instance button
VPC: (select your VPC)
Subnet Group: (select the Subnet Group you created in Step 2 above)
Publicly Accessible: No
Availability Zone: (leave at default)
VPC Security Group: (select the security group you created in Step 1 above)
Database Name: mainDB
Step 3.2: Create a DNS Record
Get the RDS Instance Endpoing CNAME by opening the RDS Instance Console and looking at the details of your instance
Open the Route53 Hosted Zone Console
Open the alpha DNS zone
Click on the Create Record Set button and use these settings:
Name: mysql
Type: CNAME
Value: (insert your RDS Instance Endpoing CNAME)
- Click the Create button