This blog is created by Yamunadevi.
Objectives:
Learn to modify EBS volume size.
Learn to resolve EC2 instance capacity issues.
Step:1 Create a Linux Instance by following the steps:
Click on the Instance option in the left navigation panel. It will direct to the following page. Click on the Launch Instance button on the top left.
After clicking the Launch Instance, you will be redirected to the page below. Under Name and Tags give a name as MyLinuxServer and click on additional tags.
Click on the Next: Add Tags button in the down-right corner.
Add Tags
Key: Name
Value: Linux Server
In Application and OS image (Amazon Machine Image) choose Instance Type. Under Amazon Machine Image (AMI), choose Amazon Linux 2023 AMI.
Under Instance type, select t2.micro
Under the key pair section, select the existing key pair. Here we are using the Mumbai server. You can choose the key pair according to your server.
In Network settings, click on the Edit option at the right corner.
Keep VPC as default and choose anyone subnet from the downlist. Here we are using 1b.
In the Auto-assign public IP, select the enable option.
Step:2
In Firewall Security, choose Create Security group.
Security Group name: LinuxSG
In the description enter the following text, Security Group for Linux Servers
Keep the default SSH rule and in the Source type, select Anywhere
Warning: Rules with the source of 0.0.0.0/0 allow all IP addresses to access your instance. We recommend setting security group rules to allow access from known IP addresses only. While using this feature for production make sure the known IP address is entered.
Under Configure Storage, click on Add new Volume.
Let everything be the default and mention the required size of the volume 50GB in this case.
In the Summary section review your instance details and click on Launch Instance.
Go back to the Instances, your Instance will be created.
Step:3
In the left navigation panel of the AWS console go into Volumes, under Elastic Block Store. Here you will see our 2 volumes created (One was added by default with the instance and the other by extra that we added)
Name these two volumes as ROOT (8GB) and DATA (50GB) below the name category by clicking the pencil icon in the name column.
Select the DATA volume and click Create Snapshot on Actions.
Step:4
Now Stop the Linux Instance
Click on the drop-down menu beside the Actions button.
Select the Instance State and click on Stop Instance.
Now go back to Elastic Block Store > Volumes
Select the DATA volume and click on Modify volume.
Initially the size of volume in this case is 50 GB. We see the same value in the
new Modify Volume pop-up window. Increase it to different value. E.g. 100 GB.
Note: Choose the same subnet while creating its associated Instance in the future.
Click on Modify Volume.
Thus, the old volume is modified into a new volume with increased size of 100GB.
Step:5
Go to EC2 & Start the Instance.
Step:6
After Starting the instance, in EBS, make sure that the new ROOT volume is in-use state. The modified volume will be in the available state.
Note: If you no longer need this instance and the Volume, make sure to terminate the instance and delete the volume.
Was this document helpful? How can we make this document better. Please provide your insights. You can download PDF version for reference.
For your aws certification needs or for aws learning contact us.
Easy to understand.
easy steps to understand
Very useful !
Easy to understand the concept of modify EBS volume sir
Very good explanation and easy to understand