Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 1.01 KB

README_AWS.md

File metadata and controls

41 lines (24 loc) · 1.01 KB

Commands for getting Amazon EC2 Instance Ready

  1. SSH to your amazon ec2 instance from mac and Linux

Open your terminal and go to the folder, where you have saved your key value pair and run below command

 ssh -i <key-pair.pem> ec2-user@<public/private ip address>
 ssh -i devops-ec2.pem [email protected]
  1. Connecting your amazon ec2 instance from windows using putty

Follow the instructions at below link.

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

  1. Run the below commands in sequence after connecting to amazon ec2 instance command line.
sudo yum update

sudo yum install docker

sudo docker --version

sudo service docker status

sudo service docker start

sudo service docker status

sudo docker run -p 80:8888 shubhamkushwah123/my-test-app:1.0.0

AWS CLI Commands

aws configure

aws ec2 describe-instances --query 'Reservations[].Instances[].PublicIpAddress[]'

aws ec2 start-instances --instance-id i-03f05f9b0b1fd768d