Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon AMI Windows instance + "user-data"?

is it possible to send a "user-data" to the Windows instance at the loading? I know that amazon allow to send it to *nix-based instance, but I can't find any information for Windows.

Thanks for the help, Cyril

like image 441
Cyril Deba Avatar asked Jan 28 '26 16:01

Cyril Deba


1 Answers

Amazon updated EC2Config on Windows AMIs on April 11, 2012 to support scripting through user-data for batch scripts and in May 2012 to support powershell scripts.

<script></script> tags will create and execute a batch file.
<powershell></powershell> tags will create and execute a powershell script.

Note that by default it only runs at instance initialization, so if you want it to execute each time you boot, you have to run the EC2ConfigServiceSettings and tell it to allow this always.

like image 59
ehambright Avatar answered Jan 30 '26 04:01

ehambright



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!