在Greengrass(v1.9.4)上解决无法部署Node.js(v8.10) Lambda的问题的方法

※追记
在Greengrass Nodejs SDK的GitHub页面上写着哦。
https://github.com/aws/aws-greengrass-core-sdk-js

将文件重命名为nodejs8.10
确保文件不是符号链接。

貌似符号链接也不行。


如果将Node.js(v8.10)的Lambda部署到Greengrass上,就会出现错误。

Deployment xxxxx of type NewDeployment for group xxxxx failed error: worker with xxxxx failed to initialize

查看日志,似乎说没有名为nodejs8.10的二进制文件。

[ERROR]-runtime execution error: unable to start lambda container.  {"errorString": "failed to run container sandbox: container_linux.go:344: starting container process caused \"exec: \\\"nodejs8.10\\\": executable file not found in $PATH\""}

強制安排下,我們成功地達成了目標。

sudo ln -s /usr/bin/nodejs /usr/bin/nodejs8.10

Node.js的设置有问题吗?

环境

操作系统:Ubuntu 18.04(Mac上的VirtualBox)
Greengrass:1.9.4
Node.js:10.17.0

我按照官方网站(https://github.com/nodesource/distributions/blob/master/README.md)的指示进行了Node.js的安装。(截至2019年11月24日,最新的版本是v10.17.0已安装)

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

在树莓派上还有更多内容。

尽管Raspberry Pi也会出现类似的问题,但按照上述步骤进行部署将能够成功。然而,在Lambda执行时会发生错误并且无法执行。对于这个问题,我不知道解决办法…请帮忙…

树莓派Zero W
操作系统:Raspbian Buster
Greengrass:1.9.3
Node.js:10.16.3

当Lambda被调用时,会出现以下错误。

[ERROR]-standard_init_linux.go:207: exec user process caused "operation not permitted"