AWS Series — EBS Cheat Sheet

AWS Series — EBS Cheat Sheet

Elastic Block Store is the Volume that is attached to your EC2 instance.

EBS: SSD Volumes —

Highly available and scalable storage volumes you can attach to an EC2 Instance

gp2 —

  • Suitable for boot disks and general applications.
  • Up to 16,000 IOPS per volume
  • Up to 99.9% durability

gp3 —

  • Suitable for high performance applications
  • Predictable 3,000 IOPS baseline performance nad 125 MiB/s regardless of volume size.
  • Up to 99.9% durability

io1 —

  • Suitable for OLTP and latency-sensitive applications
  • 50 IOPS/GiB
  • Up to 64,000 IOPS volume.
  • High performance and most expensive
  • Up to 99.9% durability

io2 —

  • Suitable for OLTP latency- sensitive applications
  • 500 IOPS/GiB
  • Up to 64,000 IOPD per volume
  • 99.999% durability
  • Latest generation Provisioned IOPS volume

EBS: HDD Volumes

This is used for big data and data warehouses where we need high throughput.

st1 —

  • Suitable for big data, data warehouses and ETL
  • Max throughput is 500 MB/s per volume.
  • Cannot be a boot volume.
  • Up to 99.9% durability

sc1 —

  • Max throughput of 250 MB/s per volume.
  • Less frequently accessed data
  • Cannot be a boot volume
  • Lowest cost
  • Up to 99.9% durability

EBS Volumes and Snapshots

  • Volumes exist on EBS, whereas snapshots exist on S3
  • Snapshots are point-in-time photographs of volumes and are incremental in nature.
  • The first snapshot will take some time to create. For consistent snapshots, stop the instance and detach the volume.
  • You can share snapshots between AWS accounts as well as between regions, but first you need to copy that snapshot to the target region
  • You can resize EBS volumes on the fly as well as changing the volume types.

AMIs: EBS vs Instance Store

An AMI is just a blueprint for an EC2 instance.

  • Instance Store Volumes are sometimes called ephemeral storage
  • You can reboot both EBS and Instance Store volumes and you will not lose your data.
  • Instance store volumes cannot be stopped. If the underlying host fails, you will lose your data.
  • By default, both root volumes will be deleted on termination. However, with EBS volumes, you can tell AWS to keep the root device volume.
  • EBS-backed instances can be stopped. You will not lose the data on this instance if it is stopped.

Protecting EBS volumes with Encryption

With Encrypted Volumes:

  • Data at rest is encrypted inside the volume.
  • All the data in flight moving between the instance and the volume is encrypted.
  • All snapshots are encrypted.
  • All volumes created from the snapshot are encrypted.

To Encrypt Volumes:

  • Create a snapshot of the unencrypted root device volume.
  • Create a copy of the snapshot and select the encrypt option
  • Create an AMI from the encrypted snapshot
  • Use that AMI to launch new encrypted instances.

EC2 Hibernation

  • EC2 Hibernation preserves the in-memory RAM on persistent storage(EBS)
  • Much faster to boot up because you do not need to reload the operating system
  • Instance RAM must be less than 150 GB
  • Instance families include C3, C4, C5, M3, M4, M5, R3, R4 and R5.
  • Available for Windows, Amazon Linux 2 AMI, and Ubuntu.
  • Instances can’t be hibernated for more than 60 days

Points to Remember for EFS—

  • Support the Network File System (NFSv4) protocol.
  • Compatible with Linux- based AMI ( windows not supported at this time)
  • Encryption at rest using KMS
  • File system scales automatically; no capacity planning required
  • Only pay for the storage you use (no pre-provisioning required).
  • Can scale up to petabytes
  • Can support thousands of concurrent NFS connections
  • Data is stored across multiple AZs within a region.
  • Real-after-write consistency.
We use the EFS mainly when we need highly scalable shared storage using NFS

Which Storage should you choose for which use case?

  • EFS — When you need distributed, highly resilient storage for Linux instances and Linux — based applications.
  • Amazon FSx for Windows — When you need centralized storage for Windows-based applications, such as SharePoint, Microsoft SQL Server, workspaces, IIS Web Server, or any other native Microsoft application.
  • Amazon FSx for Lustre — When you need high — speed, high — capacity distributed storage. This will be for applications that do high performance computing (HPC), financial modeling etc., Remember that FSx for Lustre can store data directly on S3

Storage Options Use Cases —

  • S3 — Used for serverless object Storage
  • Glacier — Used for archiving objects
  • EFS — Network File System (NFS) for Linux instances. Centralized storage solution across multiple AZs.
  • FSx for Lustre — File Storage for high performance computing Linux file systems
  • EBS Volumes — Persistent storage for EC2 instances
  • Instance Store — Ephemeral storage for EC2 instances
  • FSx for Windows — File Storage for Windows instances. Centralized storage solution across multiple AZs

Points to Remember for AWS Backup —

  • Consolidation — Use AWS backup to back up AWS services, such as EC2, EBS, EFS, Amazon FSx for Lustre, Amazon FSx for Window File Server, and AWS Storage Gateway
  • Organizations — You can use AWS Organizations in conjunction with AWS Backup to back up your different AWS services across multiple AWS accounts.
  • Benefits — Backup gives you centralized control, letting you automate your backups and define lifecycle policies for your data. You get better compliance, as you can enforce your backup policies, ensure your backups are encrypted, and audit them once complete.