How do I expand the EBS root volume of my EC2 Windows instance?

3 minute read

I've run out of space on my Amazon Elastic Compute Cloud (EC2) Windows instance. I want to dynamically expand the Amazon Elastic Block Store (Amazon EBS) volume of my Windows instances.


An EC2 Windows instance launched with an Amazon Machine Image (AMI) has a 30-GiB General Purpose SSD (gp2) root volume by default. You can expand the disk space of your EBS volume attached to your Windows EC2 instance by following these steps:

  1. Expand the EBS volume's size by through the Amazon EC2 console or the AWS Command Line Interface (AWS CLI).
  2. Extend the EBS volume's file system space at the operating system level with Disk Management or PowerShell.

Expand the EBS volume's size

Use the Amazon EC2 console or the AWS CLI to expand the size of your EBS volume.

Note: To learn more about the limitations of Windows volumes, see Requirements for Windows volumes.

Use the EC2 console to expand the EBS volume

  1. Open the EC2 console.
  2. In the navigation pane, choose Instances, and then select your instance.
  3. Choose the Storage tab, and then select your volume.
  4. In the Volumes pane, select the check box for the volume you want to expand.
  5. From Actions, choose Modify volume.
  6. Under Volume details, enter the Size and IOPS based on the volume type.
  7. Choose Modify, and then choose Modify in the dialog box.
  8. In the Volumes pane, see the volume's optimizing progress under Volume state. Refresh the Volumes pane to see progress updates.
  9. When the Volume state shows that the volume is optimizing, you can extend the EBS volume's file system.

Use the AWS CLI to expand the EBS volume

Note: If you receive errors when running AWS CLI commands, make sure that you're using the most recent version of the AWS CLI.

  1. Run the modify-volume CLI command to expand the EBS volume.
    Important: Replace all placeholder values in the AWS CLI commands with your values. For example, replace RegionName with the AWS Region for your EBS volume.

    aws ec2 modify-volume --region RegionName --volume-id VolumeId --size NewSize --volume-type NewType --iops NewIops
  2. Run the describe-volumes-modifications command to see your volume's optimizing progress:

    aws ec2 describe-volumes-modifications --volume VolumeId --region RegionName

Extend the EBS volume's file system space

Use Disk Management or PowerShell to extend the file system space for your EBS volume.

Use Disk Management to extend the file system space

Use PowerShell to extend the file system space

Note: Before extending a file system that contains valuable data, it's a best practice to create a snapshot of the volume. You can use the snapshot to roll back your changes. For more information, see Create Amazon EBS snapshots.

Related information

Request modifications to your EBS volumes

Extend a Windows file system after resizing a volume

AWS OFFICIALUpdated a year ago