I am trying to make a windows 2008 AMI that is a nice clean 64bit starter pack (IIS, SQL express, ASP.NET MVC, etc...) I would like to make it a public AMI when its done. There in lies the problem.

I can make an AMI from my image no problem. But I can't seen to get new instances to generate their own passwords.. The results are that I have a new instance that works great with my password.

So what is the process of making my EBS backed Instances convert into an AMI that will auto-generate its password when a new instance starts up?

Thanks in advance.


You could go to the EC2ConfigService Settings (Start -> all programs) on your instance. Under "Set Password" put a check in "Set a random password ....".

The password will be generated on next boot and your ami created from the instance will have a random generated password.

Alternatively you can edit your C:\Program Files\Amazon\Ec2ConfigService\Settings\config.xml file by setting Ec2SetPassword to enabled:


And restarting the Ec2ConfigService (running as a windows service on the instance.)

After doing this you can create your ami in the usual way (shut down the instance and rigth-click on the instance -> "Create Image (EBS AMI)".

  • I think your question is really about getting the random password generated. Am I right? In that case I think the title should be something like "How to generate a random password on an EC2 windows instance?". I have seen quite many ask this question on the web, so this could be very community helpful with a more precise title. – steenhulthin Jun 5 '11 at 17:20
  • 1
    It's a little different now, EC2ConfigService Settings > Image > Administrator Password > Random – Matthew Woo May 3 '18 at 22:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.