
如何使用 AWS EC2 Ubuntu 实例从 Web 端点运行特定命令?
例如http://ipaddress.com/endpoint触发 Ubuntu 命令
例如http://ipaddress.com/endpoint/?parameters=bla通过传入一些参数来触发 Ubuntu 命令
答案1
这不会执行您所要求的操作,但如果您想远程执行在 EC2 实例(Amazon Linux 或 Ubuntu)上运行的命令,AWS Systems Manager 的运行命令功能将允许您在 EC2 实例上远程执行命令:
https://docs.aws.amazon.com/en_pv/systems-manager/latest/userguide/execute-remote-commands.html
/垫子