AWS-RunShellScript calls python script but can't find python modules

Viewed 167

I am attempting to run a shell script on an ec2 from the systems manager. The shell script has a call to run a python script. It works perfectly when I run it manually, but if I run it through the systems manager it says it can't find the downloaded module. The module is numpy if that changes anything. Why is doesn't this work?

1 Answers

Why is doesn't this work?

Probably because SSM does not execute as your normal user (ubuntu or ec2-user) in its shell. You should install numpy system wide, or change your user when your AWS-RunShellScript executes your scripts.

Related