AWS Builder Center
Amazon EC2 for Absolute Beginners: What It Is and How It Works

Amazon EC2 for Absolute Beginners: What It Is and How It Works

New to cloud servers? Understand what EC2 really is, its core building blocks, pricing, and when to use it - no lab required.

Series: EC2 (2 articles)

  1. 1
    Amazon EC2 for Absolute Beginners: What It Is and How It Works This article
Cloud Engineer / DevOps and DevSecOps Engineer

I thought EC2 was way more complicated than it is

When I first opened the EC2 console, I closed it again.
Instances, AMIs, key pairs, security groups, EBS, t3.micro... it felt like I needed to learn 20 things just to rent a server.
Turns out you only need a simple mental model. Once I got that, everything clicked.
This is Part 1 of my EC2 series, so no hands-on lab here. Just the concepts. We'll launch a real server together in Part 2.

So what is EC2, really?

Forget the AWS definition for a second.
EC2 is just renting a computer by the second.
Someone else owns the hardware in a data center. You pick how much CPU, memory, and storage you want, pick Linux or Windows, and in two minutes you have full admin access to it.
You can install anything, break anything, delete it and start over. That's it.
If you remember one line: EC2 = a virtual computer you rent, control fully, and pay for only while it's running.
Why does this matter? Because before cloud, this took weeks. You had to order hardware, wait for shipping, wire up networking, install the OS. Now it's an API call.
I use EC2 when I want control. For a side project API, for practicing Linux, for something that needs to run 24/7 exactly how I configured it.

EC2 never lives alone

This confused me early on. I thought EC2 was the whole setup.
It's not. EC2 is the engine, but you need roads and fuel too:
  • Your EC2 lives inside a VPC - that's your private network
  • It boots from an AMI - that's the template
  • It stores data on EBS - that's the hard drive
  • It's protected by a Security Group - that's the firewall
  • IAM decides who can even launch one
  • CloudWatch tells you if CPU is spiking
You don't need to master all of these today. Just know EC2 is one piece, not the whole puzzle.

The only 6 terms you need for Part 2

Let me break these the way I wish someone explained them to me.

1. Instance: just a server

An instance is one virtual server. That's all.
You can start it, stop it (like shutting your laptop), reboot it, or terminate it (throw it away for good).
That stop vs terminate difference trips everyone up once. Stopped still exists. Terminated is gone.

2. AMI: the starting blueprint

AMI stands for Amazon Machine Image, but I just think "blueprint."
It's the OS plus whatever software is pre-installed. Amazon Linux 2023, Ubuntu 22.04, or even a WordPress-ready image from Marketplace.
Pick one at launch, and every server you launch from it starts identical.

3. Instance type: how powerful?

This is where t3.micro, m5.large looks intimidating.
Here's my cheat sheet:
  • First letter is the family. T is cheap/burstable, M is balanced, C is for compute-heavy, R is for memory-heavy, G has GPUs.
  • Number is generation. t3 is newer than t2.
  • Last part is size. nano < micro < small < medium < large.
Honestly? Start with t3.micro. It's cheap, it's in Free Tier, and it's enough to learn. I ran my first three practice projects on it.

4. Key pair: your house key

For Linux servers there's no password by default. AWS gives you a .pem file instead.
Lose that file and you lock yourself out. I learned this the hard way and had to relaunch an instance. Download it, back it up, treat it like a house key.
We'll actually use this in Part 2, so just remember the name for now.

5. Security group: the bouncer

This one caused my first "why isn't this working?!" moment.
My web server was running, but I couldn't open it in the browser. Reason? Security group.
By default everything is blocked. You have to explicitly open doors:
  • Port 22 for you to SSH in
  • Port 80/443 for the world to see your website
If your app runs but you can't reach it, check this first. It's almost always this.

6. EBS: the hard drive

EC2 is compute. Your files live on EBS, Elastic Block Store.
Good news: even if you stop your instance, your data stays on EBS. You just pick a size like 8GB or 30GB. gp3 is the normal default now, you don't need to overthink it.

Let's talk money, because everyone worries about this

I was scared to launch anything because I thought I'd wake up to a $500 bill.
EC2 pricing is actually three simple ideas:
  1. On-Demand: pay per second while running. Flexible, perfect for learning.
  2. Reserved / Savings Plans: commit for 1-3 years, get a discount. For stable company workloads, not for us right now.
  3. Spot: super cheap spare capacity, but AWS can take it back anytime. Great for batch jobs.
If your account is new, you get 750 hours a month of t3.micro free for a year. That's one server running full-time.
My rule I still follow: running = paying for compute. Stopped = paying a tiny bit for storage. Terminated = paying nothing.

When I would NOT use EC2

This took me a while to learn. EC2 is powerful, but it's also work. You patch the OS, you handle scaling, you fix it at 2am if it crashes.
Sometimes there's a better tool:
  • Just a static site? Put it on S3 + CloudFront.
  • Just a small function that runs on demand? Use Lambda.
  • Running containers? Look at ECS or Fargate.
  • Want the simplest VPS with no learning curve? Lightsail.
I pick EC2 when I want full control and a server that stays up.

Where we're headed

If you open the EC2 console today, don't launch anything yet. Just click through Instances, AMIs, Key Pairs, Security Groups. Get used to the names.
In Part 2, we'll do the real thing together - launch, connect, host a page, and clean up properly so you don't get charged.
EC2 only feels hard because of vocabulary. You just learned the vocabulary. The hands-on part will feel easy now.

Series: EC2 (2 articles)

  1. 1
    Amazon EC2 for Absolute Beginners: What It Is and How It Works This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article