Amazon AMI Windows实例+"用户数据"?

Cyr*_*eba 3 cloud amazon-ec2

是否可以在加载时向Windows实例发送"用户数据" ?我知道亚马逊允许将它发送到基于*nix的实例,但我找不到任何关于Windows的信息.

谢谢你的帮助,西里尔

eha*_*ght 5

Amazon于2012年4月11日在Windows AMI上更新了EC2Config,以支持通过批处理脚本的用户数据编写脚本,并在2012年5月更新以支持PowerShell脚本.

<script></script> tags will create and execute a batch file.
<powershell></powershell> tags will create and execute a powershell script.
Run Code Online (Sandbox Code Playgroud)

请注意,默认情况下它仅在实例初始化时运行,因此如果您希望每次启动时都执行它,则必须运行EC2ConfigServiceSettings并告诉它始终允许此操作.