Amazon Elastic Block Store
Amazon Elastic Block Store (Amazon EBS) is a type of storage designed specifically for Amazon EC2 instances. Amazon EBS allows you to create volumes that can be mounted as devices by Amazon EC2 instances. Amazon EBS volumes behave like raw unformatted external block devices. They have user supplied device names and provide a block device interface. You can load a file system on top of Amazon EBS volumes, or use them just as you would use a block device.
You can create up to twenty Amazon EBS volumes of any size (from one GiB up to one TiB). Each Amazon EBS volume can be attached to any Amazon EC2 instance in the same Availability Zone or can be left unattached. If you need more than 20 volumes, please complete the Amazon EBS Volume Limit Request Form and your request will be considered.
Amazon EBS provides the ability to create snapshots (backups) of your Amazon EBS volumes to Amazon S3. You can use these snapshots as the starting point for new Amazon EBS volumes and can protect your data for long term durability. Additionally, you can share snapshots with specific users or make a snapshot public.
Amazon EBS volumes provide the following:
-
Off-instance storage
-
Persistence beyond the lifetime of instances
-
High availability and reliability
-
Ability to attach to and detach from a running instance
-
Exposure as a device within an instance
Amazon EBS snapshots provide the following:
-
Ability to capture the current state of a volume
-
Data backup
-
A method for instantiating new volumes that contain the exact contents of a snapshot
Amazon EBS Use Cases
This section describes common Amazon EBS use cases.
Fault Tolerance
Amazon EBS is designed to allow you to attach any instance to a storage volume. In the event you experience an instance failure, your Amazon EBS volume automatically detaches with your data intact. You can then reattach the volume to a new instance and quickly recover.
Launch Process
1 |
You are running an Amazon EC2 instance that is attached to an Amazon EBS volume, when your Amazon EC2 instance fails or is experiencing problems. |
2 |
To recover, you detach the Amazon EBS volume from your instance (if it has not already automatically detached), launch a new Amazon EC2 instance, and attach the Amazon EBS volume to the new instance. |
3 |
In the unlikely event the Amazon EBS volume fails, you can create a new Amazon EBS volume based on the most recent snapshot of your failed volume. |
Launching New Volumes Using Snapshots
Amazon EBS snapshots allow you to quickly launch new volumes, using a previous snapshot as a starting point for those new volumes.
Launch Process
1 |
You are running a web service with a large data set. |
2 |
When the data is ready, you can store a snapshot of your volume to Amazon S3 for long term durability. |
3 |
When traffic and resource usage increases, you can launch a new volume from the snapshot, launch a new instance, and then attach the new volume to the new instance. |
4 |
If traffic decreases, you can shut down one or more Amazon EC2 instances and delete their Amazon EBS volumes. |
Data Persistence
Amazon EBS volumes exist separately from the actual instances and persist until you delete them. This allows you to store your data without leaving an Amazon EC2 instance running.
Launch Process
1 |
You run an instance periodically to perform a batch processing job on a large and growing data set. |
2 |
At the end of your job, you shut down the Amazon EC2 instance, but leave your Amazon EBS volume running. |
3 |
The next time you process the data set, you launch a new Amazon EC2 instance and reattach it to your existing Amazon EBS volume. |
Using this model, you can process and store your data set indefinitely, only using the processing and storage resources that you require
Root Partition
You can use an Amazon EBS volume as the root device on Linux/UNIX and Windows instances. This enables you to have a root device up to 1 TiB in size.
Additionally, you can resize the root device at any time and, in the event of instance failure, mount the device from another instance.
Launch Process
1 |
You find an existing AMI backed by Amazon EBS, make changes, and create a new AMI. |
2 |
If the root device becomes too small, you stop the instance and restart it using a larger Amazon EBS volume. |
3 |
If the instance fails, you launch a new instance and mount the root device of the failed instance. |
Large Data Sets
Amazon EBS offers larger volumes than Amazon EC2 instances provide. Each Amazon EBS volume can be up to one TiB Amazon EBS in size.