AWS Elastic Beanstalk – Node not found after creating NodeJS instance

amazon ec2elastic-beanstalknode.js

Using AWS Elastic Beanstalk I chose to launch an instance that runs NodeJS. EC2 instance launched but when I check what version of node is running I get this:

node --version

-bash: node: command not found

My EC2 instance AMI ID
aws-elasticbeanstalk-amzn-2015.09.2.x86_64-nodejs-pv-201602232224 (ami-ae3fddce)

Best Answer

The AMI image by default doesn't add node to the bash PATH.

You can add a symlink in /bin, pointing at node using the following bash command.

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