How to create an RDS instance in AWS in under 8 minutes!

Опубликовано: 25 Март 2026
на канале: CS Students
73
4

Learn how to setup an RDS instance in Amazon Web Services (AWS). We will configure the security policies to allow outside connections and then we will test the database by trying to connect to it from a Postgres client called PgAdmin4.

Transcript

Hello everyone today were going to go over how to create an RDS
Instance in AWS. To get started your going to want to head over to
aws.amazon.com/console and click create
an AWS account. Now you really want to make sure
For this tutorial that you are in a 12 months of free tier access
Do you have a brand new aws account. The only way to get this is if you
Don't already have one. You really need a unique email, unique billing address,
Unique credit card, they will try to match this up against everything you have
To make sure you cant cheat the system. So if you don't have this
Then you'll have to pay roughly 50 cents to a dollar a day to be able
to keep the instance running. But if you can make a new aws account and get the
12 months of free tier access it's really good for these tutorials.
I already have an account so I'm going to sign in. And make sure you choose
Root user not IAM user because this will make a lot of our tasks easier
to give ourselves permission for what we need
When you first login your gonna
Get prompted to this service console where you can find all the different services
services aws offers. Were interested in RDS the relational
Database service. You use this whenever you want any type of SQL
Database whether it be MySql or PostgresSQL
Now at the top you will see create database but this is for amazon aurora
Which is a more advanced and costly version of what we need so were not going to use that one
Scroll down until you see create database for RDS
Click create database make sure it's on standard create
We want to choose PostgresSQL, and then
It should popup in a moment here but now we have the free tier option
We want to make sure we check that. For our Postgres version
You can any version really, I'm just going to ahead and select the latest
Now the database identifier
This doesn't matter so you can leave it as database-1
For username I'm going to set this as my name, so saran123
For Password I will use Toblerone
Now there's a few options we gotta make sure we configure so we don't get charged
No matter what. The Enable storage auto scaling we don't want that
For additional connectivity configuration you want it to
To be publicly assessable this is going to be useful when we need to
Have our lambda functions later connect to our database to be able to read and write
To the database. The database
Port we can leave as 5432, thats the standard for Postgres sql
In additional configuration
You want to disable automatic backups
Everything else looks good so once you have all those options selected
You can click create database
And from here itt'l take anywhere
From 1-10 minutes to be able to setup, create the database
And this status will change to a green checkmark. And once thats done
You have your database created.
And we have this endpoint and port we need to be able to connect to it to make sure that
It's working fine. For that were going to use a tool called pgadmin
So go ahead and google pgadmin, click on the first link
And were going to go to downloads. You may have security settings that block applications from the outside to be downloaded
The easiest way to fix that is to go to system preferences
Security and privacy, general
And make sure that this button down here
Is allow apps downloaded from App Store and identified
Developers
Now were going to go ahead and click add new server
And the details from this server
Are going to be based on whatever we have in our RDS instance. So for this you can just
Call it AWS RDS, and go to connection
And were going to take this endpoint as our host.
The port is going to stay the same,
The name Postgres will stay the same. For username
Your going to put whatever you entered, I did saran123, and I did my password
As Toblerone. And you might have also been prompted
To choose a master password for pgadmin, and you can set that to
Whatever you want as well. That just saves your servers that you add later on
Click save password and it looks good
Were going to go ahead and try to connect
When we hit save this first time
You notice that it says timeout expired. Thats because in our RDS instance
We never added a security rule that allows us to connect
To it from the outside. One of the most common mistakes with aws
Is this connection timeout because there is a lot of different security rules
And policies to learn in aws that allows us to access
Your services from the outside world. So to fix that were going to go here
To security and click on our default security groups
Were going to
To choose actions, edit inbound rules,
We want to add a rule and this rule will be all traffic,
From my ip, and your going to go and hit save
Rules