【发布时间】:2019-05-19 04:31:08
【问题描述】:
基本上我想通过使用 aws cloudformation 模板安装 iis 服务及其期货和角色,有人可以帮忙吗?
【问题讨论】:
标签: amazon-web-services iis amazon-cloudformation
基本上我想通过使用 aws cloudformation 模板安装 iis 服务及其期货和角色,有人可以帮忙吗?
【问题讨论】:
标签: amazon-web-services iis amazon-cloudformation
您可以在用户数据字段中提供 PowerShell 脚本。该脚本将在第一次实例启动时自动运行。
应该是这样的:
"UserData" : {
"Fn::Base64" : {
"Fn::Join" : [
"",
[
"<powershell>\n",
"# Install IIS and Web Management Tools.\n",
"Import-Module ServerManager\n",
"install-windowsfeatures web-server, web-webserver\n",
"install-windowsfeature web-mgmt-tools\n",
"</powershell>\n"
]
]
}
}
我只是从我的模板中复制了这个,所以请自己测试!此示例为 JSON 格式,但您也可以使用 YAML。
【讨论】: