AWS Tutorial
Setup an AWS database for FREE
Setup free tier PostgreSQL database on AWS RDS
Introduction
For a student or beginner data scientist, you need to equip yourself with skills like Python, R, and SQL for the minimum to land your first data scientist job. However, it’s not common for a student to own a database so they can practice SQL and loading data from the database and do their analysis. With AWS RDS students have a viable option to practice their skills for FREE.
Create an AWS Account
Go to the AWS website
Then follow the steps to register for an account. (You will need a credit or debit card to register)
Upon completing sign-up, go to AWS Management Console.
Create a Database
Choose a database creation method — Standard create
Be sure to choose the Free tier to automatically limits your usage to the free tier.
Note that Amazon RDS is free only for 12 months according to AWS documentation.
AWS Free Tier
Since we’re using Amazon RDS, make sure you delete the database before it charges you upon free tier expiration.
Connectivity
Under Connectivity, we need to allow public access so that AWS can assign a public IP address to the database.
We’ll leave the other configuration as it is and click on the “Create Database” button.
We’ll wait for the Status to turn to Available before it’s available to be used.
Setup PostgreSQL server
For an experienced user, you can already connect to the DB instance and do whatever you want. For a beginner, you probably want to connect to download a GUI so you can import or visualize your data (query a table) in PostgreSQL GUI.
Inside pgAdmin4, right-click on Servers, click on Register > Server…
Database Details
Insert your database information
Click on Save to establish a connection.
If you couldn’t connect to the server, check if you have added your IP address to the security group.
Edit the security rule
Type: PostgreSQL (This will add 5432 to the port which is the default for PostgreSQL)
Source: My IP (This will automatically search for your IP and add /32 at the back)
Now I’ve added my prepare-db into the PostgreSQL database
With this, you can import your data into the PostgreSQL database and host it in AWS RDS for free.
Precaution
Remember that AWS RDS is not always free. You’ll have to delete your instance before that to avoid payment. For a student especially you do not want to be charged when you’re experimenting in AWS.
To be continued
In the upcoming articles, I will show you how to create a table in PostgreSQL using python so you don’t have to create the table manually, and for a more experienced developer how you can load your data into AWS RDS without downloading pgadmin4.
Conclusion
To set up a free tier database in AWS you need to:
- Register for an AWS account on the AWS website
- Create a DB instance
- (Optional) Download and setup pgadmin4
- Add MYIP to the security group
- Connect to AWS RDS
Thank you for reading this article. See you again at the next one! Bye.