NodeJS runtime issues with the greengrass-support interface and the aws-iot-greengrass snap


I installed the aws-iot-greengrass snap on ubuntu-core in a virtualbox, and successfully connected it to the aws-iot cloud. However I identified the following potential issues.


Do you know how to run NodeJS 6.10 lambdas on the aws-iot-greengrass snap’s current version ? Because from my tests, NodeJS 6.10 lambdas deployed to the snap can’t run since NodeJS 6.10 is missing from $PATH.

Is there a plan to release the 1.9.0 version of the snap and update the interface to NodeJS 8.10, before the deprecation of NodeJS 6.10 lambdas on AWS ? Otherwise It may soon be impossible to push new NodeJS lambdas to and run them at all on the aws-iot-greengrass snap.

The nodejs lambdas are successfully pushed but can’t run on the Greengrass core (at least on my environment)

I successfully pushed and ran a Python 2.7 lambda on the device. However there is no way to do the same successfully with NodeJS 6.10. On the greengrass core, nodejs6.10 is missing from $PATH thus preventing the lambda to run. The following errors show in the runtime.log file:

[2019-05-19T07:46:55.967Z][INFO]-Starting worker arn:aws:lambda:eu-west-1:919510806644:function:Greengrass_HelloWorld:4
[2019-05-19T07:46:56.045Z][ERROR]-Runtime execution error: unable to start lambda container: failed to run container sandbox: container_linux.go:344: starting container process caused "exec: \"nodejs6.10\": executable file not found in $PATH"
[2019-05-19T07:46:56.047Z][ERROR]-failed to start worker d5260972-1b3a-483d-7df8-7c7e27e2e90f: process start failed: failed to run container sandbox: container_linux.go:344: starting container process caused "exec: \"nodejs6.10\": executable file not found in $PATH"

Is this:

  • an issue with my setup : adding the desired runtime to the $PATH is undocumented or hard to find. In that case, would you please point me to the right direction to configure this ?
  • an issue with the aws-iot-greengrass snap : the snapcraft.yaml doesn’t seem to reference the runtimes though
  • an issue with the greengrass-support interface : the snapcraft.yaml references the runtimes but doesn’t register it to the $PATH explicitly. I’m too new to snaps to understand it well, so I guess it must be done in a config batch somewhere at install time.

It may soon be impossible to push new NodeJS lambdas at all to the aws-iot-greengrass snap

AWS has since long stated that their support for NodeJS 6.10 will be dropped by the end of the month (2019-05) in favour of NodeJS 8.10. After that, legacy NodeJS 6.10 lambdas will continue to be executed for some time but it will be impossible to publish new ones.

From my tests, AWS IOT Core checks that the NodeJS version of the cloud lambda matches the Greengrass core runtime version before deploying it to the core.

In that case, it is urgent to release the 1.9.0 version of the aws-iot-greengrass snap and update the greengrass-support interface with NodeJS 8.10, since the current 1.8.0 greengrass SDK is only able to run NodeJS 6.10 lambdas. I couldn’t identify another place but this forum to post this potential issue.

Thanks for your help.


1 Like

I can’t install NodeJS snap either because it needs to run on classic confinement

So the only way to make this stack work is to make NodeJS available from the interface or in the snap, am I right ?

1 Like

@ijohnson did some work on this interface recently and can perhaps comment.

Yes the issue you’re having seems to be with the snap packaging specifically, and not the interface as far as I can tell. The version of NodeJS that lambdas can use can only come from inside the snap. I will look into this a bit for you, but in the meantime if you haven’t already done so you should try and start a thread with the AWS support team for Greengrass.

Thank you :+1:

I posted two distinct threads on the AWS Greengrass forum for each issue a few days ago with no answer so far. I’m willing to help but couldn’t identify another place like a Github repo where I would, for example, post a pull-request:

I checked the aws-iot-greengrass snap files in /var/aws-iot-greengrass/2/snap/ and here is what I found:

There is no plugin: node or node-engine specified in the snapcraft.yaml (I guess it’s normal :slight_smile:). Instead, nodejs is referenced in the rootfs-stage-packages section. Abstract:

    - nodejs=4.2.6~dfsg-1ubuntu4.2

in the dpkg.list node 4.2.6 is referenced. Abstract:

| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                         Version                       Architecture Description
ii  nodejs                       4.2.6~dfsg-1ubuntu4.2         amd64

This is obviously not the required nodejs6.10 required by Greengrass 1.8.0 specs.


I just wanted to keep you posted with the latest news from the AWS GG forum:

  • They are aware of the nodejs6.10 deprecation for 1.8.x and they work on it (hopefully), but they couldn’t communicate on an estimated date for the release
  • In the meantime the moderator managed to reproduce the version incompatibility of nodejs runtimes on his side and is investigating for a potential solution

Did you install python2.7? How did you run the lambda?

I’m asking because in my environment (UbuntuCore16), python3.5 is by default.
I’m trying to install 2.7 but I haven’t found the way yet.
As well, python3.7 is supported til GGC 1.9v, but the snap for UbuntuCore is currently on the 1.8v.

I’m not being able of running any lambda.

I wanted to wrap the Greengrass Core v1.10 in my own personal snap. But then I read their “Greengrass Core Software License Agreement” here:

Will I be breaking their License Agreement if I embed the Greengrass Core in my own snap for the community users of AWS?

If yes, is there a way to overcome this by downloading the Core on the Go inside a Snap?

I almost started a repo for the same:
If anybody is interested in collaborating you are welcome.

An alternative would be to deploy Node JS services as Docker Containers and then have them communicate with Greengrass Core using the Greengrass SDK.

Any thoughts?

. Hari

Regarding this, the best place to get an answer for this would be to ask AWS, I’m not sure anyone on this forum is enough of an expert on AWS licenses to be able to answer the question.

1 Like

Thanks @ijohnson.

I will try posting on AWS forum.