Lesson 01Read

What is Amazon EC2?

A virtual server you rent by the hour — instance types, machine images, and why nothing here is a filesystem or a bucket.

Amazon EC2 is compute — not storage, not a database. Instead of buying and racking a physical server, you rent a virtual server, called an instance, by the hour (sometimes by the second). Stop paying and the instance goes away; need ten more, launch ten more.

What an instance is built from

Every instance starts from a machine image (an AMI) — a template bundling an operating system and whatever software comes pre-installed on it — and a chosen instance type, which is really a family-and-size pair (t3.micro, t3.small, m5.large, …) picking how much CPU, memory, and network throughput that instance gets. Same image, different instance type, and you've got the same software running on a bigger or smaller machine.

Where it runs

Like every AWS resource, an instance launches into a Region and, within it, a specific Availability Zone — one of that Region's several physically isolated data centers. Placing two instances in two different AZs is how a workload survives one data center having a bad day: an outage in us-east-1a doesn't take down whatever's running in us-east-1b.

What's coming

Over the next few lessons you'll provision an instance in CDK, open a firewall rule so it's reachable over HTTP, and hand it a startup script that turns a bare machine into a running web server — the exact shape of a real "launch a server, put it on the internet" task, built entirely in code.