Back to Compute

Amazon EC2 (Elastic Compute Cloud)

aws

Scalable virtual machine compute capacity in the cloud powered by the high-performance AWS Nitro System.

COMPUTE
Amazon Web Services

Scalable virtual machine compute capacity in the cloud powered by the high-performance AWS Nitro System.

Click any section above to jump directly to it
GCP ➔ AWS Bridge
Fast-Track Mental Model Translation

Coming from Google Cloud?

Compare with Google Cloud Compute Engine (GCE)

Both provide enterprise IaaS virtual machines with high-performance networking, custom machine families, and persistent block disks.

What's Conceptually Identical
  • Full root OS-level access to Linux and Windows Server environments.
  • Decoupled network-attached persistent block storage (EBS gp3/io2 vs GCP Persistent Disks).
  • Deep discount models for fault-tolerant batch workloads (AWS Spot Instances vs GCP Spot/Preemptible VMs).
  • Automated multi-zone fleet scaling (AWS Auto Scaling Groups vs GCP Managed Instance Groups).
Key Architectural Shifts in AWS
  • Hypervisor: AWS uses custom Nitro hardware ASICs; GCP uses KVM with Andromeda network virtualization.
  • Custom Sizing: GCP allows arbitrary custom vCPU/RAM ratios; AWS offers pre-configured instance sizing tiers.
  • Instance Maintenance: GCP automatically performs Live Migration without VM reboot; AWS notifies for planned retirement windows.
  • Access Management: GCP uses Cloud IAM + OS Login; AWS uses IAM Instance Profiles + SSM Session Manager (no port 22 needed).
Syntax & Command Translator
Launch Virtual Machine
GCP:gcloud compute instances create my-vm --zone=us-central1-a --machine-type=e2-standard-2
AWS:aws ec2 run-instances --image-id ami-0c55b159cbfafe1f0 --instance-type m7g.large --subnet-id subnet-012345
List Running Instances
GCP:gcloud compute instances list
AWS:aws ec2 describe-instances --filters 'Name=instance-state-name,Values=running'
Connect via Secure Shell (Zero Open Ports)
GCP:gcloud compute ssh my-vm --zone=us-central1-a --tunnel-through-iap
AWS:aws ssm start-session --target i-0123456789abcdef0

What is Amazon EC2 (Elastic Compute Cloud)?

Amazon Elastic Compute Cloud (Amazon EC2) provides on-demand, resizable compute capacity in the cloud. Built on the modular AWS Nitro System, EC2 offloads hypervisor, storage, and networking tasks onto dedicated hardware cards, delivering near 100% host resources to virtual machines with minimal virtualization jitter.

Decision Guide: When to Choose This Service

When to Use Amazon EC2 (Elastic Compute Cloud)

Use Amazon EC2 when you require full OS-level control (Linux/Windows), custom kernel modules, bare-metal access, legacy software migrations, or specialized hardware (Graviton4, NVIDIA H100 GPUs).

When NOT to Use (Recommended Alternatives)

Do NOT use EC2 for simple containerized web microservices (use AWS Fargate or App Runner) or short-lived event-driven tasks (use AWS Lambda) where managing VMs creates unnecessary operational toil.

Core Architectural Pillars

AWS Nitro System

Dedicated ASIC cards offloading hypervisor, EBS storage, and VPC networking for near-zero host overhead.

Instance Types

Diverse families including General Purpose (M7g), Compute (C7g), Memory (R7g), Storage (I4i), and GPU (P5).

Auto Scaling Groups (ASG)

Multi-AZ fleet management with Target Tracking scaling and automated instance healing.

Spot Instances

Surplus compute capacity available at up to 90% discount with 2-minute interruption warnings.

Systems Manager (SSM) Session Manager

Zero-SSH browser and CLI access without opening port 22 or managing keypairs.