【发布时间】:2021-07-19 13:48:51
【问题描述】:
我正在尝试通过系统管理器在 ec2 上运行 shell 脚本。 shell 脚本有一个运行 python 脚本的调用。当我手动运行它时它工作得很好,但是如果我通过系统管理器运行它,它说它找不到下载的模块。如果改变任何东西,该模块是 numpy 的。为什么这不起作用?
【问题讨论】:
标签: amazon-web-services amazon-ec2 aws-systems-manager
我正在尝试通过系统管理器在 ec2 上运行 shell 脚本。 shell 脚本有一个运行 python 脚本的调用。当我手动运行它时它工作得很好,但是如果我通过系统管理器运行它,它说它找不到下载的模块。如果改变任何东西,该模块是 numpy 的。为什么这不起作用?
【问题讨论】:
标签: amazon-web-services amazon-ec2 aws-systems-manager
为什么这不起作用?
可能是因为 SSM 在其 shell 中不作为普通用户(ubuntu 或 ec2-user)执行。您应该在系统范围内安装 numpy,或者在您的 AWS-RunShellScript 执行您的脚本时更改您的用户。
【讨论】: