Home RDS Setup
Post
Cancel

RDS Setup

RDS Setup

0. What is RDS? What can we use RDS for?

Amazon’s RDS (Relational Database Service) “is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks”. Essentially, it boils down to having a large database hosted in the cloud that can be accessed from anywhere, and can be scaled up or down as needed. You can probably tell by now that it seems like an amazing tool for hosting large amounts of info across multiple projects, and it very much is! RDS can handle up to

1. AWS RDS Setup

Before we can do anything further, we need to, obviously, setup RDS. Fortunately, here’s a step by step guide:

1.a Getting Started

Open up the amazon RDS page and click on create database.

Orange button Create Database

From here, we have 2 choices. Standard and Easy create. For this blog, lets use the standard create.

1.b Select Database Type

Here we have several different database types that can be selected. Select the database type you want to use. For this blog, we will use MySQL. Most of the steps will (probably) be the same (or at least similar) for other database types.

Select Database Type

1.c DB Templates

There are 3 DB templates: Production, Dev/Test, and Free Tier. Each one has it’s own use cases and strengths.

DB Templates

This table will break it down:

TemplateUse CaseStrengths
ProductionProduction workloadsHigh Availability, Durability, and Scalability
Dev/TestDevelopment and TestingCost-Effective, Easy to Use
Free TierLearning and ExperimentingFree for 12 months, Easy to Use

For this blog, we will use the Free Tier template (and if your using RDS for a project, you might want to do this as well). This also means we don’t really have to worry about the Availability and durability settings.

1.d DB Details

Lets give our database a name, and a username and password. Make sure to remember these, as we will need them later. For projects in CSA, please adhere to Mr. Mortensen’s naming conventions, but if none are given, lets just use the name of your group and your period. For example, if you are in group 1 and period 1, you could name your database group1P1. For this blog, we will be using “RDSDemoP1”.

Next, lets set the username and password. Enter a master username, usually it’s just admin. For passwords, I would recommend using self managed, as it is a lot simpler to use. Specify, confirm, and note down your master password. IF YOU LOSE THIS PASSWORD YOU ARE __COOKED__

DB Details

1.e Instance Configuration

We don’t really have to worry about this section!

1.f Storage

Again, not too much to worry about unless you have a project that needs a really large storage size. Change it to something reasonable, not something insane. (please i beg you)

1.g Connectivity

This section is where things get a bit confusing.

The first big choice is whether to connect your RDS to an EC2 or not. Both have their own use cases and advantages, broken down in this table.

EC2No EC2
Easy setupHave to set up using separate database server
Less controllabilityEasier to do custom settings/debugging
Lower processing powerCan be as powerful as you need it to be on your own server
Costs money for the instanceno instance required

We don’t really have t worry about changing the VPC, as the default one is fine.

Connectivity

If you’re not using an EC2, select yes on public access, otherwise you will not be able to access the RDS. If you’re using an EC2 in the same VPC, it would probably be in the best interest of security to select no.

If you are using an EC2, you can select the security group that the EC2 is in. If you are not using an EC2, you can select the security group that the RDS is in. For this blog, we will not be using an EC2, so we will select the security group that the RDS is in. The group will probably end up being Default if you are doing the same thing as me.

Connectivity

Nothing else really has to be done here except for the RDS Proxy which just makes your database more secure. However, it isn’t nesscary and it is also a paid feature.

1.h Tags, Authentication, and Monitoring

Don’t worry about adding any tags to your RDS, but do make sure your RDS is set to Password Authentication. Otherwise, you won’t be able to properly access your RDS. Enhanced monitoring isn’t required but is a nice feature to have when debugging.

Image

1.i Additional Options

Most people skip this section which is why their RDS doesn’t work. PLEASE PAY ATTENTION TO THIS SECTION! Expand the Additional Options dropdown first.

Specify a database name for the RDS. If you do not specify a database name, Amazon RDS does not create a database. For this blog, we’ll use the name “RDSDemoDB”. The other options can be kept default.

Name Settings

Make sure to enable backups, as that is one of the main strengths of an RDS that allow it to be so reliable.

Backup Settings

Enable encryption logging, and deletion protection as you please, just keep in mind that disabling these settings may be bad for the security of your RDS.

Best Practice Settings

1.j Review and Create

Review your settings, hit the giant CREATE DATABASE button, and you’re done! Congratulations! You have successfully created an RDS!

This post is licensed under CC BY 4.0 by the author.