EBS (Elastic Block Store)
💡 Definition
Amazon EBS provides persistent block storage volumes for use with AWS EC2 instances. EBS volumes are highly available, reliable, and can be attached to any running EC2 instance in the same AZ.
🔑 Key Concepts
- Block Storage: Provides raw, unformatted block devices to EC2 instances, similar to a physical hard drive.
- Persistent: Data on an EBS volume persists independently from the life of the attached EC2 instance.
- Network-Attached: EBS volumes are network-attached, meaning they communicate with the EC2 instance over the network.
- Snapshots: Point-in-time backups of your EBS volumes, stored in S3.
⚙️ How it Works
- Create Volume: Specify size, type (e.g., SSD, HDD), and the AZ it will reside in.
- Attach to EC2: Attach the volume to a running EC2 instance within the same AZ.
- Format & Mount: Treat it like a local hard drive on the instance (format with a file system, then mount).
🎯 Use Cases
- Boot Volumes: Most EC2 instances use an EBS volume as their boot drive.
- Databases: Ideal for transactional databases that require persistent, high-performance block storage.
- File Systems: Can be used to create custom file systems.
💰 Pricing Model
- Provisioned Storage: Pay for the amount of GBs provisioned per month.
- I/O Operations: Pay for I/O requests (for certain volume types).
- Snapshots: Pay for storage used by snapshots in S3.
📝 Exam Tips (CLF-C02)
- EBS is Block Storage, not object storage like S3.
- EBS volumes are AZ-specific; they can only be attached to EC2 instances in the same AZ.
- Data persists even after the EC2 instance is stopped or terminated (unless explicitly deleted).
- Instance Store (ephemeral storage) is contrasted with EBS.
See Also: * EC2 * Instance Store * S3