DEV Community

Ayush Jain
Ayush Jain

Posted on

Understanding EC2 Instance Storage ๐Ÿ“ฆ

When launching EC2 instances, it's important to understand different storage options:

๐Ÿ”น Block Storage vs Object Storage:
๐Ÿ‘‰ Object Storage (S3): Best for large volumes of unstructured data (e.g., images, backups).
๐Ÿ‘‰ Block Storage (EBS, EC2 Instance Store): Best for transactional data and frequently accessed small files.

๐Ÿ”น File Storage:
๐Ÿ‘‰ EFS (Elastic File System): AWS-managed network file system, scalable across instances.

๐Ÿ”น Elastic Block Store (EBS) Highlights:
๐Ÿ‘‰ Acts like a network-attached USB drive โ€” uses network communication, so slight latency exists.
๐Ÿ‘‰ Attach/Detach anytime โ€” can be attached or detached from running EC2 instances.
๐Ÿ‘‰ Persistent Data โ€” survives even after the EC2 instance is terminated.
๐Ÿ‘‰ Multiple Volumes: One EC2 instance can have multiple EBS volumes attached.
๐Ÿ‘‰ AZ Bound:
๐Ÿ‘‰ ๐Ÿ‘‰ EBS volumes are tied to an Availability Zone (AZ).
๐Ÿ‘‰ ๐Ÿ‘‰ You can't attach an EBS created in us-east-1a to an instance in us-east-2a.
๐Ÿ‘‰ ๐Ÿ‘‰ Use Snapshots to migrate across AZs.

๐Ÿ”น Important Behavior:
๐Ÿ‘‰ Root EBS Volume: Created with EC2 by default; has "Delete on Termination" = true (can be disabled).
๐Ÿ‘‰ Additional EBS Volumes: Created manually; default "Delete on Termination" = false.
๐Ÿ‘‰ Billing: Charged for provisioned storage (GBs, IOPS).

๐Ÿ“š If you're preparing for AWS Certified Cloud Practitioner, feel free to use my notes here Notes

Also, feel free to follow me over LinkedIn for some corporate humor ;) and tech bytes.

Top comments (0)