AWS EC2 Explained Simply: My First Hands-on Experience

What is EC2? A Beginner’s Guide with Hands-on Example

When I first started learning AWS, I kept hearing about something called EC2. Everyone said it’s one of the most important services in AWS. At first, it sounded complicated and technical. But once I broke it down in simple terms, it all started making sense.


🌟 What is EC2?

EC2 stands for Elastic Compute Cloud.

In plain words:

  • Imagine you need a computer to run your apps or websites. Normally, you’d buy a laptop or a server.

  • With EC2, instead of buying a physical computer, you rent a virtual computer from AWS.

These virtual computers are called instances. You can start them, stop them, resize them, and pay only for the time you use them.


🛠️ Why is EC2 Important?

  • Scalable → Start with a small instance and scale to hundreds if your app grows.

  • Flexible → Choose your operating system (Linux/Windows), memory, storage, and CPU.

  • Cost-effective → No big upfront cost, just pay as you go.

Basically, EC2 is like an online computer shop in the cloud where you can instantly get exactly the type of machine you need.


👩‍💻 Hands-on Example: Launching a Simple Website on EC2

Let’s take a quick example. Suppose you want to host a basic website.

Here’s how you can do it step by step:

  1. Login to AWS Console

    • Open the AWS Management Console.
  2. Launch an EC2 Instance

    • Click Launch Instance.

    • Pick an OS (Amazon Linux or Ubuntu).

    • Choose the Free Tier instance (t2.micro).

  3. Connect to Your Instance

    • Once it’s running, click Connect.

    • You’ll get access to your virtual computer’s terminal.

  4. Install a Web Server
    Run the following commands:

     sudo yum install httpd -y
     sudo systemctl start httpd
     echo "Hello from my first EC2!" > /var/www/html/index.html
    
  5. Access Your Website

    • Copy your instance’s Public IP Address.

    • Paste it into your browser.

    • 🎉 You’ll see your “Hello from my first EC2!” page live.


📌 Quick Analogy

Think of it like opening a shop:

  • Traditional way → You buy land, build a shop, and maintain it yourself (on-premises servers).

  • With EC2 → You just rent a ready-made shop instantly and return it whenever you’re done.

That’s why EC2 is such a game-changer.


✅ Key Takeaways

  • EC2 = Virtual computer in the cloud.

  • You can use it for apps, websites, big data, or even machine learning.

  • Beginners can experiment with the AWS Free Tier (750 hours/month of t2.micro).


👉 When I tried EC2 for the first time, it felt like magic: one click and I had my own server running in the cloud. If you’re starting with AWS, EC2 is one of the best places to begin your cloud journey.

0
Subscribe to my newsletter

Read articles from Vaishnavi Jadhav directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vaishnavi Jadhav
Vaishnavi Jadhav