How do I attach a new EBS volume to a running Amazon EC2 Windows instance?

2 minute read
0

I want to attach a new Amazon Elastic Block Store (Amazon EBS) volume to an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance.

Resolution

Note:

To attach a new EBS volume to an EC2 Windows instance, complete the following steps:

  1. Verify that your instance is in the Stopped state.
  2. From the Amazon EC2 console or the AWS Command Line Interface (AWS CLI), attach the EBS volume to the EC2 Windows instance with the device name /dev/sda1.
  3. Use Remote Desktop Protocol (RDP) to connect to your EC2 Windows instance.

To attach an additional volume to an instance and make the volume available to Windows, complete the following steps:

  1. Attach the EBS volume to the Windows instance with the device name xvd[f-z]. For example, xvdf, xvdg, xvdh, . . . , xvdy, xvdz are all appropriate and available device names. For Nitro-based instances, see Amazon EBS and NVMe on Windows instances.
  2. Use RDP to connect to your Windows instance.
  3. Make the EBS volume available to use on Windows. You can use Windows PowerShell, the DiskPart command interpreter, or Disk Management to access the volume.

Note: When you use a device name to attach a volume to an instance, don't use that device name again. Amazon EC2 doesn't allow you to use duplicate device names. If you use duplicate device names, then the operation fails with the following error:

"Invalid value '/dev/xxx' for unixDevice. Attachment point /dev/xxx is already in use."

For more information, see Device names on Windows instances.

Related information

Why isn't my EBS volume increase reflected in my OS or Disk Management?

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

Best practices for Windows on Amazon EC2

Make an Amazon EBS volume available for use on Linux

AWS OFFICIAL
AWS OFFICIALUpdated 6 months ago