I'm hitting this issue all the time with a userdata script .
Based on the error code, sh complains about non-existing command. My
suspicion is some filesystem service isn't running in the time
userdata scripts are evaluated by systemd/cloud-init. I'm unable to
locate the issue, though...
Thanks for help,