I have googled this question for a while but can\'t find the answer. My question is while deploying the nodejs application on aws elastic-beanstalk servers, I want the nodejs ap
Yes, better option to use Supervisor, however in order to have ability to restart app server with help of aws console or beanstalk cli tools you need to put own handler to Elastic beanstalk hooks in the directory: /opt/elasticbeanstalk/hooks/restartappserver/enact Hook is shell, python or ruby script that placed in mentioned directory. Put logic of the supervisord restart here and you will be able to restart it with help of management console, aws cli tools (http://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/restart-app-server.html), elastic beanstalk api: (http://docs.aws.amazon.com/elasticbeanstalk/latest/APIReference/API_RestartAppServer.html)
How to add hook, install supervisiord etc you can read here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html