IaaS · Container-compatible

Amazon EC2

Virtual machines in your VPC with full control over the operating system, instance type and storage.

When to use it

Choose EC2 when you need full control over the operating system, runtime and installed software: lift-and-shift migrations, applications with OS-level dependencies or licensing tied to the server, Windows workloads, and anything that can't be containerized. EC2 is also the fallback when no managed service fits, and the only option for some instance types such as bare metal.

When not to use it

Avoid EC2 when a managed service can run the workload with less operational work. Web apps, event-driven code and containers run on Elastic Beanstalk, Lambda or ECS on Fargate without OS patching, capacity planning or instance scaling.

Trade-offs at a glance

Hosting model IaaS
Container support Container-compatible
Minimum nodes 1 (2+ across Availability Zones for a higher SLA)
State management Stateless or stateful
Web hosting Agnostic
Autoscaling EC2 Auto Scaling groups
Load balancer Elastic Load Balancing (Application, Network or Gateway Load Balancer)
Scale limit Set by your account's vCPU quotas per instance family and Region (raise them with a quota request)
Multiregion Single Region — deploy in each Region behind Route 53 or Global Accelerator
Virtual network integration Native (runs in your VPC)
Hybrid connectivity Site-to-Site VPN, Direct Connect, Transit Gateway
GPU support Supported (G, P and Inf/Trn instance families)
TLS Terminate on the load balancer (ACM certificates) or set up in the instance
Architecture styles N-tier, big compute (HPC), lift-and-shift
Required skills OS administration, networking, security patching
Operational overhead High — you manage the OS, patching and scaling
Best for teams Teams with traditional IT operations experience

Frequently asked questions

Does Amazon EC2 autoscale?

Not a single instance. Put instances in an EC2 Auto Scaling group to add or remove identical instances by metrics, schedules or predictive scaling, usually behind an Elastic Load Balancer.

How do I get a higher availability SLA on EC2?

Run two or more instances in different Availability Zones of the same Region, behind a load balancer. The Region-level EC2 SLA applies to instances deployed across multiple Availability Zones.

Can EC2 run containers?

Yes. An instance can run Docker or containerd, and ECS and EKS can use EC2 instances as their capacity. For containers without managing instances, use ECS or EKS on AWS Fargate.

Starting point, not a verdict

This is one candidate from the AWS compute decision wizard. The right choice depends on your full requirements — evaluate scaling, cost, and operational fit before committing.

Run the AWS wizard →