Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon EC2 API and Windows instances - any way to get drive letter assignment?

I have Windows EC2 instances that I am managing via a C# application; I'm using the AWS.NET SDK. I'm trying to figure out from the documentation if there is anyway to query the API and get the volume-to-drive letter assignment within the instances. Failing that, does anyone know if EC2 is consistent in its mapping of devicenames (e.g. /dev/sdb, /dev/sdc) to drive letter? Will /dev/sdb always be D, /dev/sdc always be E, etc.?

like image 459
Joe Avatar asked Nov 06 '22 03:11

Joe


1 Answers

In my experience, unless you go in and mess with it, the drives map out, Device Name to Drive Letter, like so:

/dev/sda1 C:
/dev/sda2 D:

/dev/xdf F:
/dev/xdg G:
/dev/xdh H:
...etc

I have no idea how to tell it to map something to E... and I've never cared to.

So as long as you let everything be the defaults, you'll get the above consistently and can easily get that Device mapping from a DescribeInstances call.

like image 113
Chris Moschini Avatar answered Nov 09 '22 04:11

Chris Moschini