Ia it possible to run node 8 lambda functions on Greengrass Core?

0

Right now, from everything I've read, Greengrass Core is requiring node 6 lamda functions. The GGC checker is looking for 6.10. And when looking at the error logs I see that its looking for node6.10 and not finding it (since I have 8 installed on the Raspberry Pi testing unit I've got).

This is pretty unfortunate since Lambda now supports v8 and theres many things in the updated Node version that are quite crucial for what I'm creating.

Anybody know of a way to use node v8 on the Greengrass Core device and run v8 Lambda functions?

已提問 5 年前檢視次數 218 次
1 個回答
0

So, I'll answer my own question here, since I've figured out something that works. Now, it is sort of a hack, and may not be officially supported by AWS, and may possibly break.

I installed nodejs (I installed the latest version of 8) on my raspberry pi. And sym linked nodejs6.10.

Install nodeJS. This link may help if you aren't sure how yet.
https://www.instructables.com/id/Install-Nodejs-and-Npm-on-Raspberry-Pi/

Now, you need to create a symlink of node matching what greengrass expects: nodejs6.10

cd /user/local/bin
sudo ln -s node nodejs6.10

That should now create a symlink for 6.10 that greengrass can use, thinking its actually 6.10, when in fact its not.

Now, add to your global environment path:

sudo vi /etc/environment

You can use whatever editor you're comfortable with. Add this to the end of file:
export PATH=/user/local/bin/nodejs6.10:$PATH

Restart your system. I don't know if greengrass will break using a later version of node, but it hasn't so far. Use with caution, and you probably don't want to go to production with this unless fully tested.

已回答 5 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南