"Waitβyouβre telling me I can launch a live website from scratch in 15 minutes using AWS EC2?" Yup. Let's do it together.
π§ What is EC2 (and Why Should You Care)?
Amazon EC2 (Elastic Compute Cloud) is your rental computer in the cloud. You can spin up a server in minutes, install anything you want on it, and use it just like your own computerβexcept it runs 24/7, from anywhere in the world.
Real-life analogy: EC2 is like renting a hotel room. You donβt own it, but you can stay, install your stuff, host a party (or website), and leave when you're done.
Perfect for:
- Hosting websites
- Running backends and APIs
- Learning Linux and DevOps
π οΈ What You'll Need
- An AWS account (free tier works!)
- Basic terminal knowledge
- 15 minutes of focus
βοΈ Step 1: Launch Your EC2 Instance
1. Go to EC2 Dashboard
π https://console.aws.amazon.com/ec2
2. Click βLaunch Instanceβ
- Name: MyFirstEC2
- AMI (OS): Amazon Linux 2
- Instance Type: t2.micro (Free Tier)
-
Key Pair: Create a new one (download the
.pem
file and save it safely!) - Security Group: Allow SSH (port 22) and HTTP (port 80)
3. Click "Launch"
Boom! Your cloud computer is spinning up π
π Step 2: Connect via SSH
On Mac/Linux:
chmod 400 my-key.pem
ssh -i my-key.pem ec2-user@<your-ec2-public-ip>
On Windows:
If you see ec2-user@ip-...
β youβre in. Welcome to the cloud, captain βοΈπ§ββοΈ
π Step 3: Host a Website
Letβs install a web server (Apache) and serve a simple HTML page.
π§ Install Apache
sudo yum update -y
sudo yum install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd
π Create Your Website
echo "<h1>Hello from EC2!</h1>" | sudo tee /var/www/html/index.html
π Open in Browser
Go to http://<your-ec2-public-ip>
Boom π₯! Your website is live on the internet.
π‘ Bonus Tips
- Want to upload real files? Use
scp
or FileZilla. - Want to go serverless next? Try AWS Amplify or S3 hosting.
- Want to set up a custom domain? Use Route 53 or GoDaddy + DNS settings.
π§ Summary
Step | What You Did |
---|---|
1οΈβ£ | Launched an EC2 instance |
2οΈβ£ | SSH-ed into your cloud server |
3οΈβ£ | Installed Apache and hosted a webpage |
All in under 15 minutes. And you did it yourself. π
π¬ Letβs Build More Together!
If you followed this and got your website liveβcongrats! Youβve just unlocked Level 1 of your cloud dev journey.
What do you want to build next? A database server? WordPress? A CI/CD pipeline?
π Drop a comment, hit the β€οΈ, and share this with someone who needs a confidence boost in tech.
Letβs demystify cloud one server at a time. βοΈπ οΈπ»
Top comments (0)