How do you choose an EC2 instance type for an application?
Quick Answer
Match the instance family to the workload profile — general purpose (t3/m-series), compute-optimized (c-series), memory-optimized (r-series) — sized by CPU, memory, network, and expected load, and validated with monitoring and load testing rather than guessed.
Detailed Answer
Start from measured requirements (CPU/memory/IO), pick the family that fits (burstable t3 for spiky low-baseline, m/c/r for steady workloads), and right-size from CloudWatch utilization after go-live. Combine with Auto Scaling for elasticity and Spot/Reserved/Savings Plans for cost. Avoid over-provisioning by iterating on real metrics.
Interview Tip
Show a data-driven process (measure to pick family to right-size from metrics) rather than naming a fixed type like t3.medium.