Amazon EC2
Virtual computers you rent by the hour, in any size, and switch off when done.
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
- An instance is a virtual machine; you choose the OS, the CPU and the RAM.
- Billing is per second while running; a stopped instance only pays for its disk.
- Families:
tandmfor general work,cfor compute,rfor memory,pandgfor GPUs. - Spot instances are the same machines at a steep discount, with the risk of being reclaimed.