DEV Community

Haripriya V
Haripriya V

Posted on

Assignment 28

Getting hands-on with cloud infrastructure was something I wanted to do for a while. So I started with a simple goal: launch a server and make a webpage accessible over the internet.
For this, I used Amazon Web Services and specifically Amazon EC2.

Step 1: Launching the Instance
I created a new EC2 instance with the following setup:

•Operating System: Amazon Linux
•Instance Type: Free-tier eligible
•Key Pair: Created for SSH access
•Security Group:
Allowed SSH (port 22)
Allowed HTTP (port 80)
One mistake here can block everything later, so I made sure the ports were correctly configured.

Step 2: Installing the Web Server
After connecting to the instance, I installed Apache:

sudo yum update -y
sudo yum install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd

Then I created a simple webpage:
echo "

My EC2 Server is Live!

" | sudo tee /var/www/html/index.html

Step 3: Accessing the Server
Using the public IP address of the instance, I opened it in a browser.
The page loaded successfully, confirming:
•Server is running
•Web service is active
•Network access is working

Problems I Faced
Not everything worked instantly:
Initially forgot to allow HTTP traffic
Mixed up private IP and public IP
Had to restart Apache once
These small mistakes helped me understand how each layer matters.

Key Takeaways
EC2 gives full control but requires manual setup
Security groups act like a firewall
Even a simple deployment has multiple checkpoints

What’s Next?
I plan to improve this setup by:
Adding a domain
Using a static IP
Exploring load balancing

Top comments (0)