How can I configure a gp2 boot volume for my Windows EC2 instances?

Wednesday, July 9, 2014

I want to use the new "gp2" volume type as the boot volume for my Windows instances, with an out-of-the-box Windows AMI from Amazon (e.g. ami-527b823a), and the AWS SDK for .NET (v2.1.7 - latest as of 9-July-2014). How do I configure my run-instances request?


Based on the post on the AWS blog, I tried setting a BlockDeviceMapping:



new RunInstancesRequest {
...
BlockDeviceMappings = {
BlockDeviceMapping {
DeviceName = "sda1",
Ebs = new EbsBlockDevice { VolumeType = VolumeType.Gp2 }
},
new BlockDeviceMapping {
DeviceName = "xvdf",
Ebs = new EbsBlockDevice {
SnapshotId = SNAPSHOT_ID
DeleteOnTermination = true,
VolumeType = VolumeType.Gp2
}
}
...
}
}


But this didn't work, and I got an unsurprising exception:



Amazon.EC2.AmazonEC2Exception: The device 'sda1' is used in more than one
block-device mapping ---> System.Net.WebException: The remote server
returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
...


Is it possible to set the boot (root) volume of my windows instances to gp2? Or do I need to wait for a later release of the SDK?







http://ift.tt/1ojnV6o