| by Arround The Web | No comments

How to Use EBS Volumes with EC2 Instances?

Amazon Web Services (AWS) cloud service provider offers an EC2 service that can be used to launch virtual machines on the cloud called instances. EC2 instance works exactly like the local computer/laptop containing all the configurations like storage, operating system, etc. More specifically, EBS is utilized to allocate storage space with the EC2 instance to store its data.

This guide will explain the use of Elastic Block Storage (EBS) volume with EC2 instances.

How to Use EBS Volumes with EC2 Instances?

To use EBS volume with EC2 instance, visit the EC2 dashboard and click on the “Instances” page:

On the instances page, click on the “Launch instances” button to head to the configuration page:

Type the name of the instance and select “Amazon Linux” machine image from the “Quick Start” section:

Select the type of instance and click on the “Create new key pair” link to create a key pair file that will be used while connecting to the instance:

Enter the name of the key pair and select its format and type before clicking on the “Create key pair” button:

Scroll down the configuration page to locate the “Configure storage” button which uses “EBS” storage to be attached to the instance:

Review the summary of the instance and hit the “Launch Instance” button:

Click on the “Volumes” button from the left panel on the EC2 dashboard:

On the volumes page, click on the “Create Volume” button:

Change the size according to the need of the EC2 instance. Make sure that the availability zone of the volume and insurance must be the same:

Scroll down the page and click on the “Create Volume” button:

On the volume page, click on the “Actions” button to expand the menu and hit the “Attach Volume” button:

Choose the instance to which the volume should be attached and click on the “Attach volume” button:

To verify that the volume is attached, select the instance and click on the “Storage” section:

Two volumes have been displayed in the storage section. The first one was created at the time of instance creation and the other is attached later which is highlighted in the screenshot below:

That was all about EBS volume with an EC2 instance.

Conclusion

To use EBS volume to the EC2 instance, head into the EC2 dashboard from the AWS Console and launch an EC2 instance. EBS storage is created while creating the instance to store the data of the instance. After that, head to the volume page and create an EBS volume within the availability zone of the instance. Simply attach the volume to the EC2 instance to add to the previously used storage space. This blog offered the method to use EBS Volumes with EC2 instances.

Share Button

Source: linuxhint.com

Leave a Reply