- ssh ec2-user@34.201.105.246 -i learn-ec2-keypair.pem
- sudo su
- yum update -y
- yum install httpd -y
- service httpd restart
- chkconfig httpd on # start on restart
- service httpd status
- cd /var/www/html
- nano index.html
- Download putty.exe
- Download puttygen.exe # in windows we cannot use pem file instead use ppk file
- Load pem file in puttygen
- It will generate private key
- Save private key as .ppk file (it will as for passphrase which can be ignored)
- Open putty and copy IP address in putty - ec2-user@34.201.105.246
- On left - Connection > SSH > Auth - give ppk file
- Optionally can save and connect
Login to machine
- ssh ec2-user@34.201.105.246 -i learn-ec2-keypair.pem
- aws configure # give access key and secret key
- aws s3 ls
- aws s3 mb s3://my-unique-bucket
- echo "hello world" > hello.txt
- ls # show hello.txt
- aws s3 cp hello.txt s3://my-unique-bucket
- aws s3 ls s3://my-unique-bucket