Introduction to AWS Elastic Block Store(EBS)
Amazon EBS (Elastic Block Store) is a scalable and high-performance block storage service provided by AWS. It is designed to work with Amazon EC2 instances, offering persistent storage that remains available independently of the lifecycle of the EC2 instance.
Key Features of Amazon EBS:
Block-Level Storage:
- EBS provides block storage, like a hard drive or SSD, for EC2 instances. This allows you to run databases, and applications, or store file systems.
Persistence:
- The data stored in an EBS volume persists even after the EC2 instance it is attached to is stopped or terminated (if the volume is not configured to delete on termination).
Scalability:
- You can resize your EBS volumes to meet changing storage requirements without downtime.
Performance Options:
EBS offers multiple volume types optimized for different use cases:
General Purpose SSD (gp3/gp2): Balanced performance for general workloads.
Provisioned IOPS SSD (io2/io1): High-performance storage for latency-sensitive workloads like databases.
Throughput Optimized HDD (st1): Cost-effective storage for data warehouses or log processing.
Cold HDD (sc1): The lowest-cost option for infrequent access data, such as backups.
Availability and Durability:
- EBS volumes are automatically replicated within their availability zone to protect against component failures.
Snapshots:
- EBS supports point-in-time snapshots, which are stored in Amazon S3. These can be used for backups, disaster recovery, or creating new volumes.
Encryption:
- EBS supports encryption at rest using AWS Key Management Service (KMS). Encryption protects data, snapshots, and backups.
Flexibility:
- Volumes can be attached to or detached from EC2 instances dynamically, making it easy to manage storage.
Types of EBS Volumes:
SSD: This storage type is suitable for small chunks of data that require fast I/Ops. SSDs can be used as root volumes for EC2 instances.
General Purpose SSD (GP2)
Offers a single-digit millisecond latency.
Can provide 3000 IOps bursts.
IOps speed is limited from 3-10000 IOps.
The throughput of these volumes is 128MBPS up to 170GB. After which throughput increases 768KBPS per GB and peaks at 160MBPS.
Provisioned IOPS SSD (IO1)
These SSDs are IO-intensive.
Users can specify IOPS requirements during creation.
The size limit is 4TB-16TB
According to AWS claims “These volumes, if attached to EBS optimized instances will deliver IOPS defined within 10% 99.9% times of the year”
Max IOPS speed is 20000.
HDD: This storage type suits Big Data chunks and slower processing. These volumes cannot be used as root volumes for EC2. AWS claims that “These volumes provide expected throughput 99.9% times of the year”
Cold HDD (SC1)
SC1 is the cheapest of all EBS volume types. It is suitable for large, infrequently accessed data.
Max Burst speed offered is 250 Mbps
Throughput optimized HDD (ST)
Suitable for large, frequently accessed data.
Burst speed ranges from 250 MBPS to 500 MBPS.
Common Use Cases:
Running databases (e.g., MySQL, PostgreSQL, MongoDB).
Hosting file systems.
Storage for containerized applications.
Backup and disaster recovery.
How It Works:
Create an EBS Volume:
- Create a volume in the same availability zone as your EC2 instance.
Attach to an EC2 Instance:
- Attach the volume to an EC2 instance.
Format and Mount:
- Format the volume (if required) and mount it on the EC2 instance to use it as a file system or storage drive.
EBS provides the flexibility and performance needed for a wide range of applications, making it a key component of AWS's cloud storage options.