Block storage for persistent data for EC2 instances. Instance storage for the operating system uses EBS volumes, it is possible to add multiple volumes and even share volumes across instances using EBS Multi-Attach.
Table of Contents
EBS currently supports a maximum volume size of 64 TiB and is seen by the operating system as a locally attached storage disk (a native block device) using either MBR or GPT partitioning scheme that can be formatted using the preferred file system (Ext4, XFS, NTF).
Note: AWS and many providers now use Tebibyte (TiB) instead of terabyte (TB) as a measure of storage capacity.
The difference between units is about 10%, which is a substantial discrepancy for massive amounts of data, like in cloud storage or large server arrays.
EBS Volumes are automatically replicated across their Availability Zone (See AWS VPC Networking) and can be attached to instances in the same Availability Zone, volumes can be configured to be deleted when the instance is deleted or instead remain available for reattachment to another instance.
A root volume is the main storage volume associated with a virtual machine instance. It holds the operating system, applications, and user data for that specific instance. A root volume can be mounted into another instance and act as an additional disk. This process is commonly done to fix broken systems (e.g. ssh daemon misconfiguration preventing ssh access to the instance).
Terraform EC2 instances will use EBS root volumes for storing the Operating System and Data.
Using AES-256 the volume can be encrypted and its master keys managed by AWS Key Management Service.
Using specific methods for erasing data before usage or decommissioning.
EBS volumes can create Snapshots (an exact copy of the original volume), these copies are incremental backups of the storage, it can be shared across regions, and reused for new instance creation or recovery.
Snapshots can be created on running instances as well as on stopped instances. Only the changed blocks from the last snapshot are copied making the process convenient and extremely fast.
The volume size can be increased while the volume is being mounted (used), after a size change the Instance operating system needs to extend the file system of the EBS volume to make available the new size.
EBS volumes are available in 4 types offering different performances, capabilities, and prices.
The IOPS (Input/Output Operations Per Second) capacity is the maximum number of read and write operations that an EBS volume can perform in a second.
It provides a baseline performance of 3 IOPS per GB with a minimum of 100 IOPS and a maximum of 16,000 IOPS per volume
It allows you to specify the IOPS you need for your workload, offering consistent performance for critical applications. The volume size dictates the IOPS capacity, providing up to 64,000 IOPS per volume and a maximum volume size of 16 TiB
This is designed for frequently accessed throughput-intensive workloads, offering low-cost magnetic storage with throughput performance. Sc1 has lower throughput than st1.
It is essential to choose the appropriate EBS volume type and size based on the performance requirements and workload characteristics to ensure optimal performance and cost efficiency.
In these tutorials, the General Purpose SSD gp3 volume type will be used along with EBS–optimized instances that have dedicated network bandwidth to Amazon EBS.
IT Wonder Lab tutorials are based on the diverse experience of Javier Ruiz, who founded and bootstrapped a SaaS company in the energy sector. His company, later acquired by a NASDAQ traded company, managed over €2 billion per year of electricity for prominent energy producers across Europe and America. Javier has over 25 years of experience in building and managing IT companies, developing cloud infrastructure, leading cross-functional teams, and transitioning his own company from on-premises, consulting, and custom software development to a successful SaaS model that scaled globally.