Amazon Elastic Compute Cloud (EC2)
Basics of EC2
Instance Types
Amazon Elastic Compute Cloud (EC2) offers a wide selection of instance types optimized for specific workloads. Selecting the right EC2 instance type ensures you balance compute, memory, storage, and networking to meet performance and cost objectives.
EC2 Instance Families
Every EC2 instance family begins with a distinctive letter that highlights its primary use case. Below is a summary of the major instance families:
Instance Family | Use Case | Examples |
---|---|---|
General Purpose | Balanced CPU, memory, and networking | T2, T3, M5 |
Compute Optimized | High-performance processors | C5, C6 |
Memory Optimized | In-memory databases and analytics | R5, X1 |
Accelerated Computing | GPUs, FPGAs for ML, graphics, and compute | P4, G4, F1 |
Storage Optimized | High-throughput local storage (I/O) | I3, D3 |
HPC Optimized | Low-latency, high-throughput networking | HPC6 |
Note
Evaluate your application’s resource requirements—CPU, RAM, disk I/O, and network bandwidth—to identify the optimal instance family.
Key Benefits of Right-Sized Instances
Choosing the right EC2 instance type delivers:
- Performance Optimization
Match vCPU, memory, storage, and networking to workload demands for minimal latency and maximum throughput. - Cost Efficiency
Right-size your instances to avoid overprovisioning and reduce AWS charges. - Specialized Workloads
Utilize GPUs, FPGAs, or large RAM pools for AI/ML training, real-time analytics, or high-performance databases. - Scalability & Flexibility
Resize or switch instance types seamlessly as demand fluctuates. - Architectural Alignment
Leverage enhanced networking (ENA), EBS-optimized instances, and Nitro system features where needed.
Instance Sizes and Scaling
Within each family, instance sizes typically double CPU and memory resources at each tier. For example, a “medium” instance might offer 1 vCPU and 4 GiB of RAM, scaling up as shown:
Size | vCPUs | Memory |
---|---|---|
medium | 1 | 4 GiB |
large | 2 | 8 GiB |
xlarge | 4 | 16 GiB |
2xlarge | 8 | 32 GiB |
4xlarge | 16 | 64 GiB |
8xlarge | 32 | 128 GiB |
12xlarge | 48 | 192 GiB |
16xlarge | 64 | 256 GiB |
Actual vCPU, memory, network bandwidth, and EBS throughput vary by family and generation.
Warning
Always consult the AWS EC2 Instance Types documentation before provisioning, as configurations and pricing change frequently.
Further Reading
Watch Video
Watch video content