Amazon EBS
The virtual hard drive of an EC2 instance, kept alive even when the instance stops.
EBS (Elastic Block Store) provides volumes: virtual disks that you attach to an Amazon EC2 instance and that the operating system sees as a normal drive. The instance's root disk is an EBS volume; you can add more, like plugging in extra hard drives, and each one can be resized while in use.
The key property is that a volume is independent from the instance. Stop or terminate the machine and the volume can stay, be attached to a different instance in the same Availability Zone, or be captured as a snapshot: a backup stored in Amazon S3 that you can turn into a new volume anywhere in the Region, or copy to another one. AWS replicates every volume inside its zone, so one failed disk does not lose data.
Volume types trade price for speed: gp3 (general purpose SSD) is the default for almost everything, io2 offers guaranteed high performance for demanding databases, st1 and sc1 are cheap spinning disks for large sequential files. You pay per gigabyte provisioned per month, used or not, plus the snapshots. EBS is block storage attached to one machine; for files shared by many or served to the web, Amazon S3 is the tool.
Keep in mind
- A volume lives in one Availability Zone and attaches to one instance at a time.
- Snapshots are incremental backups stored in S3; copy them across Regions for disaster recovery.
gp3is the default; pickio2for heavy databases,st1orsc1for cheap bulk storage.- You pay for the gigabytes you provision, not for the ones you fill.