The steps for creating an instance and deploying the Hello World web application using AWS CLI have already been demonstrated in Chapter 2, Deploying Your First Web Application. You need to make sure to install the awscli utility before proceeding further. Here is a quick overview for deploying the Hello World web application using AWS CLI:
$ aws ec2 run-instances \ --instance-type t2.micro \ --key-name EffectiveDevOpsAWS \ --security-group-ids sg-01864b4c \ --image-id ami-cfe4b2b0$ aws ec2 describe-instances \ --instance-ids i-0eb05adae2bb760c6 \ --query "Reservations[*].Instances[*].PublicDnsName"
Make sure to replace i-0eb05adae2bb760c6 with the AWS instance ID that you created in the previous command.
$ ssh -i ...