EC2
Amazon EC2 (Elastic Compute Cloud) is AWS's primary virtual machine service. EC2 provisions virtual servers (instances) in minutes, billed by the second, with a wide selection of CPU, memory, GPU, and network configurations. EC2 launched in 2006 and remains the bedrock compute primitive on which much of AWS is built.
Core concepts
- Instance type. A family + size that defines CPU, memory, storage, and network capacity (e.g.
m7i.xlarge,c7g.large,g5.2xlarge). - AMI (Amazon Machine Image). The OS image used to boot the instance.
- EBS volume. Network-attached block storage; persists independently of the instance.
- Security group. Stateful instance-level firewall rules.
- Key pair. SSH credentials used at launch; the instance has the public key, the user holds the private key.
- VPC and subnet. The virtual network the instance lives in.
Purchase options
- On-demand. Pay per second, no commitment.
- Reserved Instances and Savings Plans. Commit to one or three years for substantial discounts.
- Spot. Use spare capacity at up to 90% off; can be reclaimed with a two-minute notice.
- Dedicated Hosts and Instances. Hardware not shared with other AWS customers, for licensing or compliance needs.
🔗