How To Build Your First Server On AWS (Free Tier)

Seif Elredeini
5 min readDec 26, 2023

--

One of the most exciting things to ever do is to launch your own server, after the many trial and error and learning many things. Now it is time to put everything together and lunch server you want for any reason.

How To Build Your First Server On AWS (Free Tier)

Knowledge Requirements:

  • AWS Account.
  • Basic Networking knowledge. (IP Addresses, Ports, Protocols, etc…)
  • Basic Encryption knowledge. (RSA, Private key, Public Key)

Required Programs:

  • PuttyGen (Converting the keys extension ’.pem or .ppk’ and generate new keys)
  • Putty or Termius (Putty and Termius are used to connect to your server) Just choose one, putty has an old GUI. Termius has more features and a better GUI.

So, let's start.

How to build your instance (Server)?

A server could be called an instance on any cloud computing platform like Azure, AWS, Google, or Oracle. On Amazon, you can launch your instances from the EC2 (Amazon Elastic Compute Cloud) tab.

AWS Dashboard

After you click on the EC2, you will see something like the one below:

AWS EC2 Resources

The most important 3 things here are:

  1. Instances (your running servers)
  2. Elastic IPs (your stable public IP address for each instance)
  3. Key pairs (it's your private key to the machine)

Step 1: Creating your instance

Click on Instances like the image above. Click on Lunch instances, you will see the options below:

Launching an instance on AWS (Free Tier)

The Name and Tags section will include the name of your server, it's only visible to you and you can change it later.

Tip: (Give good names, so you don’t get lost between the servers)

The Application and OS images (Amazon Machine Image) section is where you are going to choose which operating system you want to install on your server. Click on Browse More AMIs and search for the OS you want let's say it is “ubuntu” like below:

Choosing an OS for the AWS instance (Free Tier)

Take care, when you are installing which image are you installing and what architecture (x86 or Arm) is it running and make sure it has the free tier eligible icon under it.

The Instance type, you are going to choose either t2.micro or t3.micro make sure that it has the free tier eligible icon next to it.

Instance Type on AWS instance (Free Tier)

The Key pair is the most important part when it comes to connecting to your server or the security of your server. You are going to click on Create new key pair then do as following:

You are going to give it a name (whatever you want), then choose RSA (this is the encryption algorithm), and finally choose the .ppk extension for the private key format so we can use it with putty straight away and HIT CREATE KEY PAIR. Make Sure It Chosen After Creating It.

Key Pair for AWS Instance (Free tier)

The Networking Settings are super important, it's who can and how to access your server.

Networking Setting on AWS instance (Free tier)

Just choose the options as I did in the image above. If you are planning to make it accessible to the public or you are creating a website or a web application or something. you should know what are you doing here.

The Configure Storage, you are going to choose a storage volume maximum of 30GB for the AWS free tier.

Configure Storage on AWS instance (Free tier)

Now you can LAUNCH it. (DONE you have your first server ever. right now, Congratulations!! 🥳🥳🥳🥳).

AWS Instances

Step 2: Associating an Elastic IP for your instance

Now it's time to give your instance an elastic IP address that sticks with it forever unless you change it ofc.

On the left corner, you will find the Elastic IPs tab after you scroll down a bit.

LEFT CORNER OF AWS DASHBOARD

Click on it and you will get directed to a page where you will find, in the top right corner of it a button called Allocate Elastic IP address click on it.

ALLOCATE ELASTIC IP ADDRESS

Then you a new page will come up just click allocate without playing in the settings. Now you have an Elastic IP Address. FOCUS on the next step. You must associate this IP with an instance, if you don’t you will see a charge on your bill later. So, Choose the elastic IP that you just created and click on Actions and Associate Elastic IP address.

Now choose from these options below your Instance and Private IP address and Allow this Elastic IP address to be reassociated:

Done, you can go back to your instances and see the Elastic IP address associated with it and we can move on to the next step of connecting to this instance.

Step 3: Connecting to your instance (using putty)

We can you putty to connect to the instance your default name for Ubuntu OS is ‘ubuntu’

The HostName: ubuntu@Elastic_IP_Address

The Connection Type is SSH

Under the Saved Sessions put any name for your server and click save.

Putty GUI

Then, you are going to go to the menu on the left side:

Connections → SSH → Auth → Credentials

Finally, you are going to add the private key that you downloaded from the beginning when we were lunching the instance as follows:

Putty Private Key

Don’t forget to go back to sessions after adding your private key and save it one more time. After Saving you can just OPEN it and DONE.

Congrats 🥳🥳🥳🥳

You can thank me in the comments, and write me down if you face any problem I will help you out. Thank you and goodbye.

--

--