Amazon EBS Essential2008年〜
A block storage service that attaches to EC2 instances
What It Does
Amazon EBS (Elastic Block Store) is a high-performance storage service that attaches to EC2 instances (virtual servers). Like a hard drive or SSD inside a computer, it stores OS and application data. Data persists even when the EC2 instance is stopped, and you can resize volumes or reattach them to different instances as needed.
Use Cases
It is used for EC2 instance OS and application installation, database data storage, log file storage, and storage for applications requiring high I/O performance - anywhere you need persistent data storage alongside EC2.
Everyday Analogy
Think of it like an external SSD for your computer. When you turn off the computer (EC2), the data on the external SSD (EBS) is preserved. If you run out of space, you can swap in a larger SSD, and you can even plug it into a different computer.
What Is EBS?
Amazon Elastic Block Store (EBS) is a block-level storage service that attaches to EC2 instances. Block storage manages data by dividing it into fixed-size blocks, making it suitable for file systems, databases, and other use cases requiring fast random access. While S3 is object storage accessed over the internet, EBS operates as a disk directly attached to EC2.
Volume Types
EBS offers several volume types for different use cases. General Purpose SSD (gp3) provides a good balance of cost and performance, suitable for most workloads. Provisioned IOPS SSD (io2) is designed for use cases requiring high I/O performance, such as databases. Throughput Optimized HDD (st1) is suited for big data processing and other sequential read/write workloads. Cold HDD (sc1) is the most cost-effective option for infrequently accessed data.
Snapshots
EBS includes a snapshot feature that saves volume backups to S3. Snapshots use incremental backups, storing only the blocks that changed since the last snapshot, which saves storage costs and creation time. Creating a new volume from a snapshot makes it easy to restore data or copy it to another region. To expand your knowledge of snapshots, related books (Amazon) can also be helpful.
Getting Started
EBS volumes are automatically created when you launch an EC2 instance. If you need additional volumes, click 'Create volume' in the 'Volumes' section of the EC2 console, specifying the type and size. Attach the created volume to an EC2 instance, then format and mount it in the OS to start using it.
Things to Watch Out For
- EBS volumes can be configured to persist after EC2 instance termination, but unused volumes continue to incur charges, so delete them when no longer needed
- Choosing the wrong volume type can lead to performance issues or cost overruns, so select the type that matches your workload
- It is recommended to take regular snapshots to maintain backups