Command to connect to ec2 instance
chmod 777 key_pair.pem
ssh -i key_pair.pem [email protected]
Use putty to connect to ec2 instance
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html?icmpid=docs_ec2_console
Update OS
sudo yum update
Install node on ec2
Command to scp to copy file to ec2 instance:
scp -i ../weather-app-kp.pem ./hello.js [email protected]:/home/ec2-user
UserData script can be found here
UserData is the script which runs once during first startup of EC2 instance.