Create Windows AMI with instance storage

Posted by Jonathan Oliver on Server Fault See other posts from Server Fault or by Jonathan Oliver
Published on 2012-06-26T02:04:50Z Indexed on 2012/06/26 3:17 UTC
Read the original article Hit count: 512

I have a business use case and workflow where local/instance/ephemeral storage for an EC2 instance is ideal. Unfortunately I'm coupled to a Windows platform for this particular task and the EC2 Windows offering appears to have some deficiencies related to AMI creation.

In essence, I'm trying to figure out if there's a way to attach local instance storage to a Windows EC2 instance using the typical command line interface (because the Amazon Website GUI doesn't support it) and then to somehow create an AMI based upon that. I've tried creating a snapshot and then creating a Windows AMI based upon the snapshot, but of course the docs say this is unsupported and makes an unbootable AMI.

In short, here's what I'm trying to do:

  1. Be able to run a Windows instance (EBS/S3 instance doesn't matter)
  2. Attach local instance storage as drive D:
  3. Persist that configuration as an AMI such that I can start lots of them as necessary from either the GUI, command line, or REST API.
  4. Be able to take a launched instance, update software, shutdown, and create another AMI based upon that.
  5. Wash, rinse, repeat.

One other potential option which isn't horrible, but isn't ideal is to create an AMI which has 2 EBS volumes already attached (system+apps and data). Essentially, every time I startup an instance based upon the AMI it'll create 2 new EBS volumes of pre-determined size. I'm trying to avoid that scenario if possible.

© Server Fault or respective owner

Related posts about amazon-ec2

Related posts about amazon-ebs