EC2 Storage

(this post if part of the material I cover in my devops course)

Let's get a high-level view of ec2 storage.

Storage Options

  • AWS EC2 comes with several storage options:
    • AWS EBS is a block-level storage that persists independently from the life of its associated instance.
    • EC2 Instance Store provides temporary block-level storage for instances. It resides physically on the hardware that is running the ec2 instance itself.
    • Amazon EFS provides scalable file storage for use with Amazon EC2. You can use an EFS file system as a common data source for workloads and applications running on multiple instances.
    • Amazon FSX provides shared network systems for other types of systems (like Windows or NetAPP) and has multiple options.
  • I'd avoid listing S3 here, as it can be considerred a storage category of its own.

EC2 Root Volume

  • When we launch an instance, aws creates a root volume for the instance.
  • This is something that is part of the configuration of the AWS Machine Image (or AMI) we choose.
  • The root volume contains the image used to boot the instance.
  • Each instance has a single root volume.
  • We can add storage volumes to instances when we launch them or after they are running.

EBS Backed EC2 Instances

  • Instances that use Amazon EBS for the root volume automatically have an Amazon EBS volume attached.
  • Such an instance can be stopped and later restarted.
  • They are called EBS Backed EC2 Instances
    EBS-Backed EC2 Instance

Instance-Store backed EC2 instance

  • Instances that use instance stores for the root volume automatically have one or more instance store volumes available, with one volume serving as the root volume.
  • The idea is that the operating system is installed on that instance store, so the IO operations are faster.
  • Such instances cannot be stopped, just terminate, and any data that is stored on the root volume is deleted.
  • These instances are called Instance-Store backed EC2 instance
    Instance-Store backed EC2 instance

We'll cover some storage options in other posts.