【发布时间】:2019-04-29 15:49:44
【问题描述】:
情况如下。我们有一个运行 Windows 的 EC2 实例,它每天使用 Windows 任务计划程序运行多个程序。我们可能希望用 AWS Systems Manager 维护时段替换此设置。 但在此之前,我想从小处着手,只需使用 Systems Manager Run Command 在 EC2 实例上运行 exe。我能够定位我的实例,并且我知道必须编写 SSM 文档来定义命令,因此我尝试使用具有以下 JSON 文档结构的“aws:runPowerShellScript”:
{
"schemaVersion": "2.2",
"description": "Scheduled Scripts Launcher",
"mainSteps": [
{
"action": "aws:runPowerShellScript",
"name": "run_script",
"inputs": {
"runCommand": [
"& 'C:/Users/Administrator/Desktop/sc/TestApp.exe'"
]
}
}
]
}
带有此文档的运行命令报告成功,但目标实例上的程序未运行。也许我根本无法以这种方式启动 exe;欢迎任何指点。
【问题讨论】:
标签: amazon-web-services amazon-ec2