ENES

Amazon EC2

Virtual computers you rent by the hour, in any size, and switch off when done.

A physical server at the bottom with three virtual machines of different sizes drawn above it

EC2 (Elastic Compute Cloud) is the AWS service for renting virtual machines, called instances. You choose an operating system (Linux or Windows), a size (how many CPU cores, how much RAM), press launch, and about a minute later you have a computer you can log into and run anything on: a website, a database, a game server, a script that runs once a night.

You pay by the second while the instance is running and nothing for the machine while it is stopped. Sizes go from tiny (one shared core, half a gigabyte of RAM, a fraction of a cent per hour) to huge machines with hundreds of cores or several GPUs for training AI models. Instance types have names like t3.micro or m7g.large: the letters say what the family is good for, the suffix says how big it is.

An instance lives in one Availability Zone of a Region, its disk is usually an Amazon EBS volume, and its permissions come from an IAM role. EC2 is the most classic piece of AWS: when something cannot run as a container or as an AWS Lambda function, it ends up on an EC2 instance.

Keep in mind

Go deeper

Related terms

More in AWS