Running databases on local computers is easy and sometimes sufficient enough at the development step. But, deploying most applications needs to run databases on a remote server. There are thousands of solutions for deploying databases remotely. This article shows you how to create a simple database on AWS EC2 services and remotely manage it.
This article is written for beginners who have no cloud database deployment experience. Also, as said, there are many cloud-based and non-cloud-based solutions to deploy databases. For example, AWS has a dedicated service, called AWS RDS, for deploying databases on Cloud. We will discuss some of these solutions in the future and compare them. For today, let’s go with deploying a MySQL database on an AWS EC2 instance.
After creating your FREE AWS account and logging in, click on Services (next to AWS logo), and from the list, select “EC2” (i.e., stands for Amazon Elastic Compute Cloud which is a fancy word for a cloud computer).
From the loaded page/dashboard, select “Launch instance.”
AWS shows you that you must follow 7 steps to launch an EC2 instance.
Step A1: Choose an Amazon Machine Image (AMI)
First, let’s choose an OS for our project. The best free choice for this purpose is Ubuntu Server 20.04, which is eligible for FREE Tiers.
Step A2: Choose an Instance Type
We don’t need a big machine to test the idea. Let’s go with a simple but FREE option like t2.micro. Later we can upgrade it if we want.
Click on Next to configure instance details
Step A3: Configure Instance Details
A crucial step, but for this demo, there is nothing really to change here. You are CRUSHING IT!!!
Step A4: Add Storage
Here you must set your storage size. To be eligible for Free Tier pricing, select 8GB (the default value). You may need to increase it later when working with bigger databases (and of course, you must pay for it).