Click here to Skip to main content
15,939,960 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on simple website hosted on AWS EC2 instance. When I change the code then I push it on GitHub and manually access the EC2 instance using putty then take pull of new changes from GitHub.

I want to do this work programmatically in node, in which I write commands and these commands should run on my EC2 instance.

I read aws-sdk documentation and it works fine, but these command are for specific purpose like Run, Reboot, Restart, Describe the instance. But I want to run any Linux(ubuntu) command on my EC2 instance, for example:

sudo mkdir /var/www/frontend/directoryName;
#whatever commands I want to run like git pull...blah blah blah

What I have tried:

I spend much time to find such type documentation using node but couldn't find. In my company, my collogue wrote a script in python for same purpose and it is working fine. but I want to write such type of script in node.

Please someone help me, who have any idea about this. Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900