EC2 Startup - How to Tell When Windows Ready?

I am working with Amazon EC2, and I have some Windows AMIs backed with EBS. When I launch a new instance from an EBS snapshot, the EC2Config service prepares the Windows machine for me. I know when EC2Config is done because I can check the instance Console Output - once it says "Windows is Ready" I know I am good.

What I am looking for is a way to tell that "Windows is Ready" from within the operating system itself. I would think that the meta-data URL that is accessible from within the OS would tell me this, but I can't find any appropriate values.

http://169.254.169.254/latest/meta-data/

My goal is to run configuration scripts once "Windows is Ready". Some of my configuration tasks need to make sure the machine is fully configured before starting - especially if EC2Config is renaming the computer and rebooting. I could write something using the EC2 tools or C#...but that would require me to use my AWS keys on my AMIs (which I don't want to do). Ideally, I'd like to look at something on the machine itself to tell when I can start configuration - something like an EventLog entry, watching a text file, checking the meta-data URL, etc.

Side question: I could use a good article on exactly what the bundle/unbundle process does to EBS machines.


The EC2Config is configured by default to rename the host on first startup. Renaming the host on windows requires a reboot and therefore every instance reboots once after first startup. You can disable the renaming of the host if you do not use the internal DNS for the instance. More details here:

Windows Configuration Service: http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/appendix-windows-config.html

The EC2Config service also has its own log file within the instance:

C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog.txt

And this file should have the EC2Config service relevant details that your are seeing on the Amazon Console Output. Here's a snippet from one of my instances:

=====Starting Ec2RebootInstance in a new thread=======
Ec2InitializeDrives: Found Disk : \.\PHYSICALDRIVE0
Checking current volumes for any device name change
C: is mounted with Volume Name
Opening COM port handle to write to the console
Ec2RebootInstance:Waiting for all threads to finish
Ec2InitializeDrives: Initialization finished. Plugin exiting...
Ec2RebootInstance:Checking if any thread requested a reboot
Ec2RebootInstance:Windows is Ready to use
Sending event windows is ready to use to everyone

Ec2RebootInstance:Monitoring for reboot requests.