Deployment using AWS CLI

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 ...

Get Effective DevOps with AWS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.