what is AWS Elastic Block Store (EBS)?
AWS EBS is a service provided by Amazon Web Services that is used to create instances. This article will guide you on AWS Elastic Block Store (EBS) & It’s Volume Types.
We use this storage when we want to create a new instance and then select the root volume for instance storage. This root volume is a default volume of the instance, if you add new volume/storage, this new volume will be AWS EBS.
AWS EBS volume types
There are three types of AWS EBS volumes that are as follows:
- SSD Backed Volume (Solid State Drive)
- HDD Backed Volume (Hard Disk drive )
- Magnetic Standard
1:SSD Backed Volume (Solid State Drive)
This storage is bootable. We can install our OS (Operating System) in this storage like C Drive (used for Windows). It is faster than Magnetic storage. Two types of SSD backed volume are as follow;
- General Purpose SSD (gp2)
- Provisioned IOPS SSD (io1)
General Purpose SSD (gp2)
If we use this storage, then General Purpose SSD Storage by default is attached with our instance. Its performance is very good for the Magnetic, but its price is high. It provides 3-IOPs (input-output per second) per GB. The price depends on the region.
Provisioned-IOPs SSD (io1)
It provides maximum IOPS. It usually provides 3000 IOPs. If you have purchased good instances, then it can provide 64000 IOPs. These IOPs are used for reading, writing, and transaction operations. Its price is high in comparison with other storages.
2:HDD Backed Volume (Hard Disk Drive)
This storage is non-bootable. In this storage, we can’t install our OS (Operating System). We only use this volume for extra storage like D Drive, E Drive, F Drive, etc. Two types of this volume are as follow:
- Throughput Optimized HDD (st1)
- Cold HDD (sc1)
Throughput Optimized HDD (st1)
We can choose a minimum of 500GB storage for the instance because its price is lower than the other. We use this for daily data, like S3 storage.
Cold HDD (sc1)
We can choose a minimum of 500GB storage because its price is low to the throughput optimized HDD. It provides 250 IOPs per volume. We use this for long-term data, like S3 Glacier storage.
This storage also is bootable. We can also install our OS (Operating System) in this storage, like C Drive (used for Windows). This storage price is less than the other storage, but if we use IOPs, we will pay extra. That’s why this storage is more expensive than the other storage.
Difference between EBS and Instance storage
Two types of Block store devices are available in EC2. These devices are used like Root Volume (OS is available), and S3 storage is not used as a Root volume. Types are as follow;
- Elastic Block Storage
- Instance Storage
1:Elastic Block Storage
This type of storage is persistent. When we stop or reboot our instance, we will not lose our instance data. Instance data will only lose in this form when we terminate our instance. This storage connects through the AWS network. If we add or fetch data in the EBS, then this will work through the AWS network. So, this storage is slower than Instance storage. EBS volume can attach to a single EC2 Instance at a time.
It is directly attached to the instance; this storage is faster than the AWS Elastic Block Store (EBS) storage. Limited 10GB of data is required in each device. It is also Ephemeral Storage (Non-Persistent). It means if we stop or terminate our instance, we will automatically lose our OS and Storage; that’s why we do not usually use this storage. We use it only in the reboot instance (our data is not lost).
How to Take and Share AWS EBS Snapshot
AWS EBS Snapshot means instance image/copy. If we want to take a snapshot of our instance, stop your instance; otherwise, our instance will work. If we take a snapshot of our instance during it is working, the snapshot will take the previous instance work in this AMI image, and it will not take the present instance work in the image. We can create 5000 EBS volumes per AWS account. And we can also take up to 10000 EBS Snapshots per AWS account. We can’t share/connect EBS to other Availability zones and Regions.
You will have created EC2 instance Storage and EBS in the same availability zone, not in the different availability zone.
Snapshot specific in the region. When we take a snapshot of the EC2 or EBS, then this snapshot is automatically created in S3 Storage (in the same region). After creating this snapshot, now we can use this snapshot to the other availability zone, but the region will be the same, and now, we can also create the same EC2 instance again through this snapshot. We can also use this snapshot in the other region through the transfer process. We can also share the snapshot in any availability zone in the same region, other regions, and different AWS accounts because this snapshot is created in the S3 storage. And S3 can quickly transfer its bucket data to the other region through the IAM role.
What is Incremental Snapshot?
Increasing snapshot means, for example, our data is available in our EBS storage, but in these forms, like A, B, and C. We took the first snapshot of the storage on this date, 1/1/21. Now, if we make some changes to our C-block storage and after a few days, we take again the second snapshot on this date, 10/1/21. Now, AWS will only take a snapshot of this C block storage because we have changed this C block, not another’s, and AWS will transfer the storage of the remaining blocks A and B to another snapshot. The process is an incremental snapshot.
If you delete the first snapshot, don’t worry about your data because the second snapshot is available in your S3 storage.
How to encrypt EBS volume?
AWS EBS Encryption always performs on the EC2 instance, not in the EBS. If you encrypt your instance and take a snapshot of it, your snapshot will also be in encrypted form. If your snapshot is encrypted, you can’t create an unencrypted EC2 instance through this snapshot.
Through this method, you can transfer encrypted EBS to the unencrypted EBS or unencrypted EBS to the encrypted EBS. Please create a new unencrypted EBS, and attach it to the same EC2 instance, not the different instance. Now, you can send encrypted EBS to the unencrypted EBS. However, You can also send this data through this EC2 instance, and the EC2 instance will automatically convert encrypted EBS into the unencrypted EBS (because encryption always performs on the EC2 instance).
We can’t make public your encrypted snapshot or EBS.