AWS Free Tier • EC2 • SSH • Public IP

So you want a cloud server?

It is not as hard as it sounds. Here is how I set up a small AWS cloud server for free using student/free-tier resources.

The goal was simple: get a disposable Linux VM, give it a public IP address, SSH into it, run a basic web server, and delete it when I was done.

Important: I treated this as a throwaway learning server. Free does not mean I can ignore billing. I set a budget alert first, used one small VM, avoided extra paid resources, and cleaned everything up when I finished.

What I was trying to build

I did not need a complicated cloud setup. I just wanted the basic building blocks of a real public server.

Public IP

A server reachable from the internet

The public IP is what lets me SSH into the VM and load a test web page from a browser.

Linux VM

A disposable Ubuntu machine

I used a small EC2 instance like a VPS. If I broke it, I could delete it and make another one.

Free / Student

Use free resources first

I checked AWS Educate, AWS Academy, and AWS Free Tier before launching anything serious.

The simple version

This is the whole process without the extra details.

01
Use student/free resources.
Check AWS Educate, AWS Academy, and AWS Free Tier.
02
Protect the AWS account.
Turn on MFA and set a budget alert before creating resources.
03
Launch one small EC2 instance.
Use Ubuntu Server and a free-tier/credit-friendly instance size.
04
Add an SSH key.
Download the key, lock down permissions, and keep it private.
05
Allow only the ports I need.
SSH from my IP only, then HTTP/HTTPS if I am testing a website.
06
SSH in, update, and test.
Install Nginx, enable UFW, load the public IP in a browser.
07
Delete it when done.
Terminate the instance and check for leftover volumes, snapshots, and IPs.

Step-by-step checklist

This is the version I would follow while actually doing it.

1

I checked AWS student options

First, I checked AWS Educate with my school email. Then I checked whether my school had AWS Academy or Learner Lab access.

If I can practice in a student lab first, I should do that before creating real cloud resources.

2

I created an AWS Free Tier account

For the real public VM, I used AWS Free Tier. I checked the current Free Tier page first because AWS pricing and credits can change.

I did not assume everything was free forever. I used it as a small test environment.

3

I turned on MFA and billing alerts

Before launching anything, I protected the AWS account and created a budget alert.

This was my safety net in case I clicked the wrong thing or forgot something was running.

4

I launched one EC2 instance

In the AWS Console, I went to EC2 and launched one small Ubuntu Server instance.

  • Name: student-disposable-vps
  • OS: Ubuntu Server
  • Size: a small free-tier/credit-friendly instance
  • Storage: small default root disk
5

I created an SSH key

AWS gave me a .pem file. That file is my private key, so I moved it into my SSH folder and locked it down.

mkdir -p ~/.ssh
mv ~/Downloads/student-vps-key.pem ~/.ssh/
chmod 400 ~/.ssh/student-vps-key.pem
Does this look foreign? Start with the Linux terminal guide, then read how SSH becomes your portal to the server.
6

I opened only the firewall rules I needed

In the AWS security group, I allowed SSH only from my IP. I allowed HTTP and HTTPS only because I wanted to test a web page.

  • SSH: port 22, source: my IP only
  • HTTP: port 80, source: anywhere
  • HTTPS: port 443, source: anywhere
7

I connected with SSH

After the instance was running, I copied its public IP and connected from my computer. SSH is the encrypted terminal tunnel into a headless server. Start here if SSH is new.

ssh -i ~/.ssh/student-vps-key.pem ubuntu@YOUR_PUBLIC_IP
Does this look foreign? Read the SSH guide first. It explains the encrypted tunnel, keys, and headless server control.
8

I updated Linux and installed basic tools

Once I was inside the VM, I updated packages and installed a small web stack.

sudo apt update
sudo apt -y upgrade
sudo apt install -y nginx ufw fail2ban curl git htop
Does this look foreign? The Linux terminal guide explains sudo, apt, and why commands are the normal way to control a server.
9

I enabled Nginx

Nginx gave me a simple web server so I could test the public IP in a browser.

sudo systemctl enable --now nginx
systemctl status nginx --no-pager
Does this look foreign? Start with the terminal guide before learning services.
10

I enabled the Linux firewall

AWS has its own firewall, but I also enabled UFW inside Ubuntu.

sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw --force enable
sudo ufw status verbose
Does this look foreign? Read the SSH guide so port 22 and remote login make sense before changing firewall rules.
11

I replaced the default web page

I made a tiny test page so I knew I was seeing my server and not just a default screen.

echo '<h1>Hello from my AWS cloud server</h1>' | sudo tee /var/www/html/index.html
curl http://localhost
Does this look foreign? The terminal guide explains pipes, command output, and running quick checks from the shell.
12

I deleted the VM when I was done

For a disposable VM, cleanup is part of the lab. I terminated the instance and checked for leftovers.

  • EC2 → Instances → terminate the instance
  • EC2 → Volumes → delete unattached volumes
  • EC2 → Snapshots → delete snapshots I do not need
  • EC2 → Elastic IPs → release unused Elastic IPs
  • Billing → Bills → check the current month

What I avoided

The goal was a simple disposable VM, not a full production cloud architecture.

Thing Why I avoided it at first
Elastic IP I did not need a permanent public IP for a throwaway VM.
Load balancer Too much for one tiny test server.
NAT gateway Useful in real cloud networks, but not needed for this beginner setup.
Extra EBS volumes More storage means more things to forget and clean up later.
Multiple regions Easy to lose track of resources. I stayed in one region.

Official docs I used

This is the simple reading list. These are the links I would keep open while doing the setup.

Final result

I ended up with a small public Linux server I could SSH into, update, firewall, test with Nginx, and delete. That is enough to learn the real basics: public IPs, SSH keys, security groups, Linux firewalls, services, logs, and cloud billing hygiene.