Jump to content

How to Use EBS Volumes with EC2 Instances?


Recommended Posts

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:

use-ebs-volume-with-ec2-instance-01.png

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

use-ebs-volume-with-ec2-instance-02.png

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

use-ebs-volume-with-ec2-instance-03.png

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:

use-ebs-volume-with-ec2-instance-04.png

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

use-ebs-volume-with-ec2-instance-05.png

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

use-ebs-volume-with-ec2-instance-06.png

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

use-ebs-volume-with-ec2-instance-07.png

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

use-ebs-volume-with-ec2-instance-08.png

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

use-ebs-volume-with-ec2-instance-09.png

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:

use-ebs-volume-with-ec2-instance-10.png

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

use-ebs-volume-with-ec2-instance-11.png

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

use-ebs-volume-with-ec2-instance-12.png

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

use-ebs-volume-with-ec2-instance-13.png

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

use-ebs-volume-with-ec2-instance-14.png

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:

use-ebs-volume-with-ec2-instance-15.png

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.

View the full article

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...