avatar

Jezl

EC2 storage options

Storage options for EC2 instances

EBS Volume

Elastic Block Store - network drive. Allows for data persistence.

Can only be mounted to 1 instance at a time. It’s bound to AZ. But you can attach more than one volume to an instance

Like a network USB stick. It’s not a physical drive, it uses the network, so there is latency.

You can move it, but you’ve gotta snapshot the volume.

You can decide to terminate the EBS volume on instance termination

EBS Snapshot

EBS Volume Types

There are 6 types of EBS volume types

Characterised by SIZE | THROUGHPUT | IOPS (I/O Ops per sec)

Only GP2/GP3 and io1 / io2 can be used at boot volumes

General purpose SSD (gp2/gp3)

Provisioned IOPS volumes (io1/1o2)

HDD (st1/sc1)

Best resource: https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html

EBS multi attach

For io1/2 families you can attach same EBS volume to multiple EC2 instances in the same AZ.

This is good for high availability and concurrent writes.

Only good for one AZ and 16 EC2 instances at the same time

EBS Encryption

Elastic file system (EFS)

Allows for a network file system that allows multiple AZ instances to connect to the EFS through a security group.

efs

Use cases: content management, web serving, data sharing, Wordpress. Only Linux compatible (POSIX) system and scales automatically.

It has different perf modes:

And storage classes: