Day 45 - Amazon EBS (Elastic Block Store) Deep Dive

Today I explored Amazon EBS (Elastic Block Store) โ€” the foundational storage layer for EC2 instances. EBS volumes are durable, high-performance block storage devices that you can attach to EC2. They store everything from the OS and application data to database files.


๐Ÿ’ฝ What is Amazon EBS?

Amazon Elastic Block Store (EBS) is a block-level storage service for use with EC2. Think of it like a virtual hard drive that persists independently of the EC2 instance lifecycle.

๐Ÿ”ง Key Features:

  • Block-based storage (vs. object storage like S3)

  • Used to run OS, store app data, DB files, and more

  • Located in a specific Availability Zone (AZ)

  • Automatically replicated within the AZ to protect from hardware failure

  • Snapshots can be used to back up and restore volumes


๐Ÿ“ฆ EBS Volume Types

Amazon EBS provides multiple volume types optimized for different use cases:

1. General Purpose SSD (gp3/gp2)

  • Most common, balanced performance

  • Ideal for boot volumes, small to medium workloads

2. Provisioned IOPS SSD (io2/io1)

  • High-performance SSD for critical databases

  • Offers dedicated IOPS (input/output operations per second)

3. Throughput Optimized HDD (st1)

  • Used for big data, data warehouses, log processing

4. Cold HDD (sc1)

  • Lowest-cost storage

  • Ideal for infrequently accessed data like backups

5. Magnetic (Standard) (legacy)

  • Older generation โ€” suitable for archives and cold data

๐Ÿ” EBS Snapshots โ€” Backup and Restore

Snapshots are point-in-time backups of your EBS volumes. You can create snapshots manually or via scheduled backups.

๐Ÿ”„ Snapshot Workflow:

  1. Unmount the partition (optional but safer)

  2. Detach the volume from the instance

  3. Create a snapshot from that volume

  4. Create a new volume from the snapshot

  5. Attach the new volume to the instance

  6. Mount it back and resume operations


๐Ÿ“Œ Snapshot Use Cases

  • ๐Ÿ”„ Backup & Restore of EC2 volumes

  • ๐Ÿ“ Resize volumes (increase size without data loss)

  • ๐Ÿ”„ Change volume type (e.g., from gp2 to io1)

  • ๐ŸŒ Copy volumes across AZs or Regions

  • ๐Ÿ‘ฅ Share snapshots across AWS accounts (via permissions)

๐Ÿ“š Tip: Snapshots are stored in Amazon S3 (behind the scenes) but are block-level, incremental, and optimized for fast restore.


๐Ÿง  What I Learned Today

  • EBS is persistent block storage for EC2

  • Multiple volume types support performance and budget tradeoffs

  • Snapshots are a powerful way to backup, scale, or migrate data

  • Volume + snapshot workflows are essential for disaster recovery and infrastructure flexibility

Next: Iโ€™ll explore Amazon ELB


0
Subscribe to my newsletter

Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shaharyar Shakir
Shaharyar Shakir