
I know for some frontend developers, Amazon EC2 is still the preferred platform for deploying web servers, including complex front-end templates. However, scaling servers on EC2 can be frustrating. By default, your new server is on the t2.micro, providing only 8GB of disk size, which may not suffice for larger frontend templates.
In this article, I'll share a detailed guide on increasing disk size for an EC2 instance, which is especially useful for frontend developers looking to scale their applications.
So how do you increase disk size 8GB to perhaps 14GB on your EC2 Instance?
The first thing to do in this scenario is to log in to your AWS Management Console and stop your instance from running.
Go to Services -> EC2 -> Instances
Check the instance you want to add more disk space and click on the Actions button as shown below and Stop the instance from running.

Now that you have stopped the instance from running, simply navigate to Elastic Block Store -> Volumes.
Check the box on the volume you want to increase and click the Actions button. Click the Modify Volume option and enter the number of GB you want in the Size field. Click the Modify button once you’re done.
Now Reboot your instance. (See the image above for the reboot option).
Terminal time!

SSH to your server and run the command df -h. You will probably see something like this

As you can see, our disk partition is here — /dev/xvda1 and the disk size is now 49G and 3.0G is being used. It means we have successfully added more space to this disk partition.
You can also run this command lsblk to confirm the xvda1 partition is using the full capacity of the disk.
If yes, congratulations you have successfully increased the size of your instance.
If no, run this command sudo growpart /dev/xvda 1 for the xvda1 partition to increase to the xvda capacity.
That’s it. Go and get yourself a bottle of drink.
If you loved this article, share, clap and leave a comment.
Cheers!