I wrote a script for deploying code to EC2 instance using AWS Code Deploy, my files are getting copied to the destination, then my hooks run, remove commands, cd commands are running fine but when the following command is run:
I get the following error and deployment fails:
I have setup the node version v4.4.0 by downloading using wget and then adding following paths to bashrc:
I also added a symlink:
My appspec.yml hooks:
Questions:
If I go to the corresponding directory: /opt/codedeploy-agent/deployment-root/..... and then run my script manually as an Ubuntu user, it works fine. Although running it as sudo, gives the same error on console |
Disclaimer :-
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail and destroy all copies of this message and any attachments. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.