AWS Cloud Architecture•Part 3: Compute, Containers & Serverless (21 - 35)
EC2 Instance Families & Graviton.
In Simple Words:
- General Purpose (M, T): Balanced CPU and RAM for typical web applications.
- Compute Optimized (C): High CPU for batch jobs, media encoding, and machine learning inference.
- Memory Optimized (R, X): High RAM for in-memory caches (Redis) and large relational databases.
- Storage Optimized (I, D): High NVMe SSD I/O for data warehouses and Cassandra.
- AWS Graviton: ARM-based custom chips delivering up to 40% better price-performance than Intel/AMD.
hcl
# EC2 instance using ARM Graviton3 architecture:
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0" # ARM64 AL2023 AMI
instance_type = "c7g.xlarge" # Graviton3 Compute Optimized
}