Check the Root Partition size before resize:
After that, stop your instance:
Go to Volumes on the left-hand EC2 navigation control panel.Right-click on the volume you want to resize and select Create Snapshot.
Fill out the details of the snapshot you are creating.
Go to Snapshots on the left-hand EC2 navigation control panel.Right-click on the snapshot you created and select Create Volume from Snapshot.
Enter the new size of the partition that you would like to be, select the same availability zone in which your instance is running and click Yes,Create.
Go back to the Volumes in the EC2 control panel. Select the old root volume, right click on it and select Detach Volume.
Now right click on the new volume that we have just created and select Attach Volume.
Please make sure that the volume should be attached as /dev/sda1:
Now turn on your instance. Make a note of your partition name, in my case it is /dev/xvda1. Type the resize2fs /dev/xvda1 command.
sudo resize2fs /dev/xvda1
After that view the new root partition size.
Yes, it’s work
Hope this will help you!
Please Remember me in your prayers!