I. Introduction

  1. Elastic Block Storage (EBS) is a network drive that you can attach to your instances while they run. It allows your instance to persist data.
  2. Well suited for use as the primary storage for file systems, databases, or for any application that requires fine granular updates and access to raw, unformatted, block level storage.
  3. You can mount multiple volumes on the same EC2 instance and vice versa (multi-attach).
  4. Termination protection is turned off by default and must be enabled manually.
  5. It's locked to an AZ.
  6. In the same AZ, you can detach from one EC2 and attach to another. To move a volume, you need to snapshot it.
  7. Have a provisioned capacity (GB, IOPS).
  8. Only GP2 and IO1 can be chosen while launching an instance.

II. Types of EBS

  1. GP2 — General Purpose SSD

    1. General purpose SSD volume that balances price (cheap) and performance
    2. Recommended for most workloads
    3. System boot volumes
    4. Virtual desktops, low latency interactive apps
    5. Development and test environments
    6. Size: 1GB - 16TB
    7. 3 IOPS per GB, maxes out at 16,000
  2. IO1 and IO2 — Provisioned IOPS SSD

    1. High perf SSD for low latency and critical apps/db (IOPS > 16,000)
    2. Size: 4 GB - 16TB
    3. 10 IOPS per GB
    4. Good for large scale db where low latency might be required
    5. Min: 100, Max: 64000 (nitro instances) OR 32000 (regular instances)
  3. ST1 — Throughput optimized HDD

    1. Low cost HDD for frequent (sequential) reads
    2. NOT good for random reads
    3. Used in data warehousing, log processing, MapReduce, streaming workloads
    4. Cannot be a boot volume
    5. Size: 500GB - 16TB
    6. Max IOPS is 500
  4. SC1 — Cold HDD

    1. Lowest cost for infrequent reads
    2. Good for database and backups (store and forget)
    3. Cannot be a boot volume
    4. Size: 500GB - 16TB
    5. Max IOPS is 250
    6. Max throughput of 250MB/s, can burst
    7. Attaching both ST1 and SC1 is not supported at this time

    https://prod-files-secure.s3.us-west-2.amazonaws.com/4b1ebf36-c889-4d85-858e-cb2146e77ba5/741b03ab-7c5e-4866-a68b-82fea545644b/Screen_Shot_2020-09-25_at_10.01.09_AM.png

    courtesy of TutorialsDojo

    courtesy of TutorialsDojo

III. EBS Snapshots

  1. Incremental - only backup changed blocks.
  2. Backups use IO so do it during downtime e.g. 2am-3am
  3. Snapshots are stored in S3 but you can't directly see it, only available through EC2 API.