As part of the Ethnus AWS Internship Foundation Course, I got the chance to create my very first EC2 instance and turn it into a web server using Apache. At first, it seemed like a lot to take in — terms like EC2, web server, Apache, and security groups were new to me. But step by step, I understood how launching a cloud server is different from using a normal laptop, and how everything connects to make your website go live on the internet. This blog shares my beginner-friendly journey and explains all the basic concepts I learned along the way.
EC2 (Elastic Compute Cloud) is like a virtual computer provided by AWS. You can use it to host websites, run code, deploy servers, and more—just like you’d do with a physical laptop or desktop.
But instead of unboxing a laptop, installing software, and connecting to Wi-Fi, EC2 needs a few extra steps — all done online!
Below is the simple table. Due to which I got attracted towards Understanding EC2
Feature | Buying a Laptop | Launching EC2 on AWS |
---|---|---|
Ownership | Physical device you own | Virtual machine you rent |
Setup Time | Plug in, boot up | Multiple steps in the cloud |
Access | Local, with physical access | Remote via SSH from anywhere |
Scalability | Fixed hardware | Can scale up/down in minutes |
Firewall & Security | Pre-configured OS settings | Must set up security groups manually |
Cost | One-time upfront cost | Pay-as-you-go (hourly or monthly) |
Use case | General personal use | Hosting web apps, backend APIs, etc. |
🌍 So What Exactly Did I Create?
- I created a web server hosted on AWS EC2. That means:
- A real virtual machine in the cloud is running 24/7.
- It’s accessible from anywhere via the internet.
- It serves a web page to anyone who visits its IP address.
Things I learned
💻 What is an EC2 Instance?
Imagine you're renting a computer from Amazon that lives somewhere in a data center. That’s basically what EC2 (Elastic Compute Cloud) is — a virtual machine you can use just like your laptop, but over the internet.
When I launched my EC2 instance, I chose:
- The operating system (I used Amazon Linux)
- The hardware power (how much RAM, CPU, etc.)
- The security settings (who can access it and how)
It’s like building your own remote laptop, but with the flexibility to turn it off when you don’t need it (and save money!).
🌍 Turning It Into a Web Server with Apache
Now, what’s a web server?
A web server is just a computer that listens for people asking to visit a website — and then shows them the page.
To make my EC2 instance a web server, I installed Apache, which is free software that knows how to serve websites. It's like a waiter who listens to what people want and delivers the right dish — in this case, your website.
So I did this:
- Logged into my EC2 using SSH (like remote terminal)
- Installed Apache using a simple command
- Uploaded an HTML page to Apache’s folder
- Modified the security group to allow HTTP (port 80) so people could actually view my website
And boom — when I typed my EC2’s public IP into a browser, my webpage appeared! 🚀
⚙️ Why Not Just Use a Laptop?
This was a question I had myself.
Why launch a whole EC2 when I have a laptop?
But here’s what I learned:
Laptop 🧑💻 | EC2 Instance ☁️ |
---|---|
Personal use | Public access |
Shuts down often | Always on (24/7) |
Hard to scale | Can scale to more users instantly |
Not made for hosting websites | Designed for it |
An EC2 instance is made for hosting websites, handling traffic, and being reliable all the time — unlike your personal computer.
🧠 Other Things I Learned Along the Way
- Security Groups: They control who can access your EC2. I had to open port 80 (for HTTP) to let browsers connect.
- Termination Protection: I enabled this so I don’t delete my instance by mistake.
- Stop Protection: Prevents me from accidentally shutting it down.
- Apache vs. Flask/Node.js: Apache is perfect for basic websites. If I build dynamic websites with Python or JavaScript, I might use Flask or Node.js instead.
Understanding Why AWS Skills Are So Valuable
One of the most powerful things I realized while working with EC2 is how it gives you full control over your own network and security setup. When launching an EC2 instance, you don't just get a virtual computer — you also get to define who can access it, from where, and how, using things like Security Groups, Key Pairs, and VPCs (Virtual Private Clouds). It felt like setting up my own mini data center. This hands-on experience showed me why AWS-related jobs are in such high demand — because professionals who know how to manage these systems can build secure, scalable, and reliable infrastructure for companies around the world. You're not just using a service; you're designing the rules and architecture behind it.
✅ Steps to Create an EC2 Instance (with Simple Explanations)
Step | What You Do | Why It’s Necessary (Simple Explanation) |
---|---|---|
1 | Go to EC2 Dashboard | This is the control panel for managing your virtual servers on AWS. |
2 | Click "Launch Instance" | Starts the process to create your virtual server. |
3 | Name Your Instance | Helps you identify and manage your instances easily. |
4 | Choose AMI (Amazon Machine Image) | Selects the operating system (like Ubuntu, Amazon Linux, Windows). It's like choosing the OS on a laptop. |
5 | Choose Instance Type | Decides the virtual hardware power (CPU, RAM). Like choosing the performance level of a computer. |
6 | Create/Select Key Pair | Used to securely connect to your instance (via SSH). Think of it as a digital door key. |
7 | Configure Network Settings (VPC & Subnet) | Places your server in a specific virtual network. Like assigning your laptop to a specific Wi-Fi zone. |
8 | Set Up Security Group | Acts like a firewall. You define which ports (like SSH or HTTP) are allowed in and out. |
9 | Add Storage (EBS Volume) | Provides a virtual hard drive for your instance. Stores OS, files, and data. |
10 | (Optional) Enable Monitoring & Protection | Add features like auto-monitoring and protection from accidental deletion. |
11 | Review and Launch | Final check to ensure everything is correct before launching. |
12 | Connect to Instance (via SSH) | Lets you access and control your server from your local computer or browser. |
Top comments (2)
Great One!!
Thanks Prem