AWS in 1 Min · Episode 07

EC2 in 1 minute

Virtual servers you rent by the second. Watch the one-minute video, then read the details.

David Gomez1:16 video · 2 min read

"You have to buy servers to run your app." Not anymore. With Amazon EC2 you rent virtual servers in minutes, use them as long as you need, and stop paying for compute when you shut them down.

Instances and AMIs

EC2 (Elastic Compute Cloud) gives you virtual servers called instances. Every instance boots from an AMI (Amazon Machine Image): a template with the operating system and any preinstalled software. You can use AMIs from AWS for Linux or Windows, from the AWS Marketplace, or build your own with your app already installed.

Storage for the instance usually comes from EBS volumes, which are network-attached disks. That detail matters later for billing.

Instance types and families

The instance type sets the size of the machine: how many vCPUs and how much memory, plus network and storage performance. Types are grouped into families for each kind of job:

  • General purpose (such as M and T) for balanced workloads like web apps.
  • Compute optimized (C) for CPU-heavy work like batch processing.
  • Memory optimized (R and X) for large databases and in-memory caches.
  • Storage optimized (I) for very fast local disk.
  • Accelerated computing (P, G, Trn, Inf) with GPUs or AWS's own AI chips.

The name tells you a lot. In m7g.large, m is the family, 7 is the generation, g means an AWS Graviton (Arm) processor, and large is the size. Graviton often gives better price-performance if your software runs on Arm.

How you pay

On-Demand instances are billed only while they run. Most Linux and Windows instances are billed per second, with a one-minute minimum. Ways to pay less:

  • Savings Plans and Reserved Instances: commit to usage for one or three years for a large discount.
  • Spot Instances: use spare capacity at a deep discount, but AWS can reclaim it with a two-minute warning. Great for batch jobs and CI, bad for your only database.

Two common mistakes:

  • Oversizing. Teams pick a big instance "to be safe" and never look again. AWS Compute Optimizer recommends right-sized types based on real usage.
  • Forgetting storage. A stopped instance doesn't bill for compute, but its EBS volumes and snapshots keep costing money until you delete them.

Where AI fits

EC2 is where a lot of AI actually runs. GPU instances power the training and serving of AI models. The P family is aimed at large-scale training and the G family at inference and graphics. AWS also designs its own AI chips: Trainium for training and Inferentia for inference, available as Trn and Inf instances. GPU capacity can be scarce, so for planned training runs, EC2 Capacity Blocks for ML let you reserve GPU instances for a set period. If you'd rather not manage servers at all, Amazon Bedrock gives you models through an API instead.

Quick recap

  • An instance is a virtual server you rent. It boots from an AMI.
  • The instance type sets its size, and families match it to the job.
  • You pay while it runs, and commitments or Spot make it much cheaper.
  • GPU instances, Trainium and Inferentia run AI on AWS.
AWS in 1 Min #07 · 1:16

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS