Connecting the AWS RDS Console to your PostgreSQL Engine

Connecting the AWS RDS Console to your PostgreSQL Engine

·

6 min read

A data base is a standardized collection of data, which is stored and access electronically. With the help of database, data management is easy. Small database can be stored on a file storage, while large database are hosted on computer clusters or Cloud storage. With the world now shifting everything to the cloud space due to the expenses of running a physical server. There is more need in integrating every part of information technology into the cloud space. Data is getting enormous by the day, enterprise need to look for an easy way out, to store data and process it. That’s where cloud servers like the AWS comes in. In this article we will talk about how you can connect your AWS Console to your Database Management System. The AWS Console has what it called RDS (Relational Database Service) this is the part of the AWS Console where it simplifies the setup, operation, and scaling of a relational database for use. The administration process such as patching the database software, backing up databases and enabling point-in-time recovery are been manage by the server automatically. With the help of the AWS Control plane on-demand it will help in scaling storage and compute resources which can be perform with a single API.

Why PostgreSQL? You may ask. Well PostgreSQL is an open-source relational database management system emphasizing extensibility and SQL compliance. PostgreSQL is considered the most advance and powerful SQL compliance, its widely use by most data analyst and scientist to query data, its also an effective way for developers to build the most complex applications, run administrative task and create integral environments.

To start with lets go to our AWS platform

Go to your Search bar on your AWS Console and type RDS AWS RDS 1.png

After clicking on the RDS, it will take you to another page. Scroll down and click on Create RDS AWS RDS 2.png

What you will see next is which Database creation method to pick from. It's best to go with the Standard Creation method, this is because the standard creation method helps to give you an options to specify which setting you will pick and to prevent hidden cost later on. Then there is the easy method in which things are been set up for you automatically, this is a good idea if you are just starting on and don't really care about any settings but it is good you know there might be pricing implications if you enable certain features that enable pricing cost.

But for this article we will pick Standard Creation AWS RDS 3.png

Now AWS have 6 Database Engine options, but we are going with the PostgreSQL. And for the Version you could leave it on default or chose the latest version. AWS RDS 4.png

Give your DB Instance a name of your choosing. Have in mind that whatever name you give your DB instance it's going to be the cluster name.

Next the Credentials Settings chose a Master Username and a Master Password and then confirm the Password AWS RDS 5.png

For the Instance configuration we will leave it at default AWS RDS 6.png

For Storage we will leave it at default AWS RDS 7.png

For Connectivity, The Virtual private cloud (VPC) should be left at default for the purpose of this article. While keeping in mind that whether you pick the default VPC or Create a new VPC, it cant be change as stated in the RDS console. Subnet Group should also be left at default. AWS RDS 8.png

Public Access which should be left at NO in other to prevent access from other users. But for the sake of this article we are going to leave it at YES.

Also the VPC security group choose Create New.

For a name to your New VPC Security Group.

For the Available Zone pick anyone as this is just where you prefer your data to be stored AWS RDS 9.png

Database authentication leave it at default AWS RDS 10.png

For Additional Configuration choose a Initial database name. Every other thing under Additional Configuration should be left on default. AWS RDS 11.png

NB: In the case of the deletion protection; if you want to protect your data from being deleted click on the checkbox. This is necessary when you are not the only one using the database machine but want to prevent the data from being deleted.

Now scroll down and click on Create

Now this might take a few minutes but be patient its in the process of creating. But once created it will show Available AWS RDS 14.png

Congratulation

gif congratulation.gif

You've created your RDS

Now lets move to the PostgreSQL environment and connect the AWS database serve to the database engine. If you don't have PostgreSQL kindly use this link postgresql.org/download and download postgreSQL.

This is the PostgreeSQL/PgAdmin environment. AWS RDS 15.png

Next Click on Add New Server

AWS RDS 16.png

On General Name; give a name of your choice AWS RDS 17.png

Next click on Connection AWS RDS 18.png

To get the Host Name/address go back to the AWS Console, on AWS RDS click on DB identifier (techadmin). Click on view connection details. AWS RDS 19.png

Copy the Endpoint link and make sure the port correspond to the one on PgAdmin

AWS RDS 20.png

Go back to your PgAdmin and paste what you've copied on the Host Name/Address

For maintenance database leave it on default AWS RDS 21.png

For the Username and Password go back to your AWS RDS Management console and click on View Credential Details AWS RDS 22.png

Next copy Username and Password AWS RDS 23.png

Go back to PgAdmin and paste what you copied from the AWS Console, then click save. AWS RDS 24.png

But you will find out it didn't go through but came up with a error message. AWS RDS 25.png

Go back to the console and click on DB identifier look under Security next click the link under VP Security groups AWS RDS 26.png

This will bring you to the VPC section of the AWS Console. Click on the colored circled below to help in expanding the screen. Then click on inbound rules. AWS RDS 27.png

Next go the the right side of the screen and click on Edit inbound rules AWS RDS 28.png

Next go under Type, click and choose PostgreSQL Then go to search bar after Custom, click and choose 0.0.0.0/0 when done kindly save rules. AWS RDS 29.png

Go back to PgAdmin and click on Save AWS RDS 30.png

Congratulations you've created your AWS Relational Database Service and linked it to PostgreSQL

Now you can import your data and query them and it will be stored in the cloud space which can be accessible anywhere in the world.

Endeavor to give yourself a Toms up Gif toms up.gif