Node path on elastic beanstalk

amazon-web-serviceselastic-beanstalknode.js

It seems I have node installed in this directory here on my elastic beanstalk instance, however I do not have a node command available on the system.

$ ls -la /opt/elasticbeanstalk/node-install/
total 24
drwxr-xr-x  6 root     root     4096 Mar 31 11:39 .
drwxr-xr-x 11 root     root     4096 Apr 14 21:53 ..
drwxrwxr-x  6 ec2-user ec2-user 4096 Feb  9 12:53 node-v0.10.42-linux-x64
drwxrwxr-x  6 ec2-user ec2-user 4096 Feb  9 13:05 node-v0.12.10-linux-x64
drwxr-xr-x  6 root     root     4096 Jul 31  2014 node-v0.8.28-linux-x64
drwxrwxr-x  7 ec2-user ec2-user 4096 Apr 14 21:54 node-v4.3.0-linux-x64

I'm looking for the alias / symlink to a reliable node path that runs the server.

What is a path to node that does not include the version on elastic beanstalk?

Best Answer

You can add a symlink using the following bash command.

sudo ln -sf `ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin/node /bin/node