Amazon EBS (Elastic Block Store) là block storage gắn vào EC2 instance, như ổ cứng ảo; chỉ gắn được vào 1 EC2 tại một thời điểm (trừ EBS Multi-Attach cho io1/io2), persist sau khi instance terminate (nếu không set DeleteOnTermination), replicated trong cùng AZ.
Loại EBS:
- gp3 (general purpose SSD, mặc định khuyến nghị, 3000 IOPS base, $0.08/GB)
- io2 Block Express (high IOPS cho database production, đến 256,000 IOPS, đắt hơn)
- st1 (throughput-optimized HDD, sequential read/write cho big data)
- sc1 (cold HDD, rẻ nhất, ít dùng)
Amazon EFS (Elastic File System) là managed NFS (Network File System) có thể mount đồng thời vào nhiều EC2 instances, thậm chí across AZ — phù hợp cho shared file storage, content management, home directories; auto-scale, không cần provision trước; Standard và Infrequent Access tiers; đắt hơn EBS (~$0.30/GB vs $0.08/GB).
Instance Store (ephemeral storage) là storage vật lý gắn trực tiếp vào host server, cực nhanh (NVMe SSD), không tốn phí riêng, nhưng mất data khi instance stop/terminate/fail — chỉ dùng cho temporary data, cache, scratch space. EBS snapshot backup lên S3, cross-region copy được.
Amazon EBS (Elastic Block Store) is block storage attached to an EC2 instance, similar to a virtual hard drive; it can only be attached to one EC2 at a time (except EBS Multi-Attach for io1/io2), persists after instance termination (unless DeleteOnTermination is set), and is replicated within the same AZ.
EBS types:
- gp3 (general purpose SSD, recommended default, 3000 IOPS base, $0.08/GB)
- io2 Block Express (high IOPS for production databases, up to 256,000 IOPS, more expensive)
- st1 (throughput-optimized HDD, sequential read/write for big data)
- sc1 (cold HDD, cheapest, rarely used)
Amazon EFS (Elastic File System) is a managed NFS (Network File System) that can be mounted simultaneously on multiple EC2 instances, even across AZs — suitable for shared file storage, content management, and home directories; auto-scales with no pre-provisioning; has Standard and Infrequent Access tiers; more expensive than EBS (~$0.30/GB vs $0.08/GB).
Instance Store (ephemeral storage) is physical storage directly attached to the host server, extremely fast (NVMe SSD), included in the instance price, but data is lost when the instance stops, terminates, or fails — use only for temporary data, cache, and scratch space. EBS snapshots are backed up to S3 and can be copied cross-region.