Amazon Elastic Compute Cloud
EC2
You need a standard virtual server where you can install any operating system, runtime, and custom software stack.
Reach for it when
- Migrating legacy monolithic applications to the cloud without rewriting code.
- Running high-performance computing tasks requiring specific GPU or memory configurations.
- Hosting third-party commercial software packages that require root-level access to the OS.
Do not reach for it when
- Deploying containerized microservices that scale quickly in response to traffic — use ECS or EKS instead.
- Running short-lived, event-driven background tasks with variable execution schedules — use Lambda instead.
- Hosting a standard relational database that requires high availability and automated backups — use RDS instead.
Alternatives, and how to choose
| Service | Pick it instead when |
|---|---|
| ECS | Choose it when you want to deploy containerized applications without managing underlying operating systems. |
| Lambda | Choose it when running short-lived event-driven tasks that execute in under 15 minutes. |
How you pay
- The model
- Pay per second of instance execution based on instance size, operating system, and EBS storage volume.
- The line item that surprises people
- Unattached EBS volumes and idle Elastic IPs left behind after terminating instances continue billing hourly.
What trips people up
- Stopping and starting an instance changes its public IP address unless you allocate and associate an Elastic IP.
- T-series instances consume CPU credits; running out of credits throttles CPU performance to a crawl without warning.
- The default EBS root volume size is often too small, and instances will silently fail to boot if the root disk is 100% full.
Verify the live service
This page is a concept reference. Cost models are qualitative; confirm the current offering, Region and pricing before deploying.