On 25 August 2006, Amazon Web Services opened a beta of Elastic Compute Cloud. The promise was simple and, at the time, slightly absurd: rent a virtual machine by the hour, boot it through an API, and pay only for what you use. EC2 ran on Xen, used prebuilt images called AMIs, and exposed the raw machine rather than a managed application platform. It turned virtualization from an infrastructure optimization into a product with a price per hour.
What EC2 actually launched
The first EC2 instances were Linux virtual machines with a small set of instance
sizes, a public IP, a private IP inside a security group, and a metadata service at
169.254.169.254. Users could choose an AMI, pass a startup script as
user data, and get a shell. There was no console in the modern sense, no
managed Kubernetes, no Lambda. There was a virtual machine and an API.
That minimalism was the point. The VM was the unit of:
- isolation — tenants shared hardware but not memory or devices;
- billing — metered by instance-hour, later by second;
- failure — a crashed instance could be replaced, not repaired;
- packaging — the AMI captured an entire bootable system;
- automation — the API replaced a ticket with an HTTP call.
S3 had launched earlier in 2006, and the combination of object storage plus on-demand compute created a new deployment model. You no longer provisioned a server for a project and kept it around. You created one, used it, and destroyed it.
The economics of multi-tenancy
A cloud provider sells slices of physical hosts to many customers. The business model depends on oversubscription: selling more virtual CPUs and memory than physically exists, on the statistical assumption that most tenants are idle most of the time. A host with 64 physical cores might run 200 virtual CPUs; a host with 512 GiB of RAM might allocate 700 GiB to guests.
Oversubscription improves density and lowers cost, but it creates the noisy-neighbour problem. If one tenant runs a CPU-bound workload, the others see steal time — cycles the hypervisor gave to someone else. Latency- sensitive workloads suffer. Providers respond with scheduling policies, CPU pinning, dedicated hosts, burstable instance families with credits, and instance types that guarantee resources.
Live migration at cloud scale
Chapter 4 introduced VMotion. In a cloud, live migration becomes a scheduling primitive rather than a maintenance luxury. The scheduler can evacuate a failing host, rebalance load, follow power availability, or move a tenant closer to its storage. The mechanism is usually pre-copy: copy memory while the guest runs, track dirty pages, and repeat until the remaining set is small enough to pause the guest for the final switch. Post-copy reverses the order — start the guest on the destination and fetch pages on demand — trading page-fault latency for a shorter blackout.
Migration requires shared or replicated storage, compatible CPU features, and a network that can move memory pages fast enough to converge. In practice, providers pin CPU models or mask features so that a VM can move between generations of hardware. This is why cloud instance types expose a curated CPU feature set rather than the raw host.
Nitro and the specialization of the host
By the mid-2010s, AWS had scaled Xen to a point where the hypervisor was doing too much on the main CPU: networking, storage, security, management. In 2017 the company introduced Nitro, a family of dedicated cards and a lightweight KVM-based hypervisor that offloads I/O and virtualization functions to purpose-built hardware. The main CPU runs customer code; the cards handle network, storage and security.
Nitro also enabled bare-metal instances: customers can rent a host with no hypervisor in the path at all. The same architecture supports Nitro Enclaves, isolated compute environments with no persistent storage, no interactive access and no external networking. The cloud provider's control plane moved out of the tenant's trusted computing base — a theme that returns in Chapter 10.
Talking to a cloud VM
A cloud instance is configured at boot through a metadata service and user data. The metadata service is link-local, reachable only from the instance, and provides identity, networking and configuration. IMDSv2 requires a session token to reduce the impact of server-side request forgery.
$ TOKEN=$(curl -sX PUT "http://169.254.169.254/latest/api/token" \
-H "X-aws-ec2-metadata-token-ttl-seconds: 60")
$ curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/instance-id
i-0a1b2c3d4e5f67890
$ curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/placement/availability-zone
eu-central-1a
$ cloud-init query --format='{{ ds.meta_data.instance_id }}'
i-0a1b2c3d4e5f67890
User data is the bootstrap channel. On first boot, cloud-init reads it and applies users, SSH keys, packages, files and commands. A minimal configuration:
#cloud-config
users:
- name: deploy
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... deploy@laptop
packages:
- nginx
- fail2ban
runcmd:
- systemctl enable --now nginx
- echo "bootstrapped $(date -u)" > /var/log/cloud-init-done
From the provider's API side, the same boot is one call:
$ aws ec2 run-instances \
--image-id ami-0123456789abcdef0 \
--instance-type t3.micro \
--key-name lab-key \
--security-group-ids sg-0123456789abcdef0 \
--user-data file://user-data.yaml \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=web-01}]'
What the cloud changed about virtualization
The cloud did not invent new virtualization primitives. It industrialized the ones that existed: provisioning, isolation, metering, migration and imaging. Three shifts mattered most.
- The API became the operator. Humans stopped installing hypervisors and started calling control-plane APIs. The hypervisor became an implementation detail behind an instance type.
- Failure became routine. Instances are expected to disappear. Applications moved toward stateless designs, load balancers and managed databases because the VM underneath was no longer a pet.
- The boundary moved up the stack. Containers and Kubernetes let teams deploy without thinking about VMs, even though the VMs were still there, underneath, doing the isolation.
EC2's innovation was not the hypervisor. It was the decision to sell the virtual machine directly, with an API, a price and a self-service lifecycle. That business model turned a 40-year-old systems idea into the default way software is deployed.
Sources & further reading
- AWS, EC2 retrospective and the 2006 beta announcement.
- AWS, Instance metadata and user data.
- AWS, Nitro System.
- cloud-init documentation.
- Cloud Native Computing Foundation, project landscape.