EBS

Amazon Elastic Block Store (EBS) 筆記。

Intro

高效能區塊儲存

  • Network drive you can attach to instances while they run
  • Allows instances to persist data, even after termination
  • Can only be mounted to one instance at a time (CCP Level)
  • Bound to a specific availability zone
  • Analogy: Network USB Stick
  • CCP: one EBS can only be mounted to one EC2 instance
  • SAA: “Multi-attach” feature for some EBS

Overview

Network Drive (Not Physical)

  • Uses network to communicate with instance (some latency)
  • Can be detached and attached to another instance quickly

AZ Bound

  • EBS Volume in us-east-1a cannot be attached to us-east-1b
  • To move across AZ, first need to snapshot it

Provisioned Capacity

  • Size in GBs and IOPS
  • Billed for all provisioned capacity
  • Can increase capacity over time

Delete on Termination

Controls EBS behaviour when EC2 instance terminates:

  • By default, root EBS volume is deleted (attribute enabled)
  • By default, other attached EBS volumes are not deleted (attribute disabled)
  • Can be controlled via AWS console or CLI

Use case: Preserve root volume when instance is terminated

Snapshots

  • Make a backup (snapshot) of EBS volume at a point in time
  • Not necessary to detach volume, but recommended
  • Can copy snapshots across AZ or Region

Snapshot Features

FeatureDescription
ArchiveMove to archive tier (75% cheaper), restore takes 24-72 hours
Recycle BinSetup rules to retain deleted snapshots, specify retention (1 day to 1 year)