I start here a short series of posts on AWS EC2 as the better we understand this service, the better we can optimize its use according to our needs.

Introduction

Let’s start from the start: Elastic Compute Cloud - EC2 - was among the first services introduced by AWS back in 2006, along with Simple Storage Service - S3 - and Simple Queue Service - SQS. It provides compute power as a service from all AWS regions in a large variety of instances types.

Behind the scene, AWS virtualizes shared physical servers into smaller pieces users can start, stop within seconds. Physical servers can also be used.

EC2 has been enriched over the years to support different use cases based on:

  • Type of computation needed: it defines the EC2 instance types
  • then, the amount of compute resources needed: it defines the EC2 instance sizes

Large variety of operating systems - OS - is available thanks to the Amazon Machine Images (AMI) system.

It is important to keep in mind that AWS continues to evolves its instances on regular basis to update and add new generations based on latest technology innovation from partners or from their own R&D. In addition to better performance, performance - price ratio usually also got increased.

We will cover following topics:

  • Instances types / size and naming convention
  • Instance lifecycle
  • Instances pricing and purchasing options
  • Alternatives to EC2

Instances types, sizes and naming convention

There are 15 instances types grouped in 5 different families with dedicated use case, as depicted in picture below.

AWS-EC2-types

General Purpose Compute Optimized Memory Optimized Storage Optimized Accelerated Computing
A: ARM based workload C: Compute intensive workload R: High performance DB (in memory, cache, big data) I: High storage instances (SSD starting 0.5 TB) P: ML processing (NVIDIA Tesla powered)
T: Burstable performance (support peak CPU load) X: Large enterprise scale memory intensive applications (SAP BW, HPC) H: High storage HDD instances G: Graphics and gaming optimized
M: Balanced CPU/RAM/Network U: Large in memory database (SAP HANA) D: Very high storage (HDD) instances Inf: ML processing (AWS custom chips powered)
Z: Compute and memory intensive F: Customizable HW acceleration

Each instance type is available in different sizes providing most adequate instance to users needs. Sizes are labelled with quantitative adjectives: nano, micro, small, medium, large, xlarge, [n]xlarge and metal for baremetal instances.

The naming convention used translates all these 3 information pieces in unique names such as “r5d.12xlarge” with following format :

[ instance-type ] [ instance-generation ] [ other instance characteristic] . [ instance-size ]