Launching an EC2 instance

We now have all the information required to launch our instance. Let's finally launch it as follows:

$ aws ec2 run-instances \    --instance-type t2.micro \    --key-name EffectiveDevOpsAWS \    --security-group-ids sg-01864b4c \    --image-id ami-cfe4b2b0{    "Instances": [        {            "Monitoring": {                "State": "disabled"            },            "PublicDnsName": "",            "StateReason": {                "Message": "pending",                "Code": "pending"            },            "State": {                "Code": 0,                "Name": "pending"            },            "EbsOptimized": false,            "LaunchTime": "2018-08-08T06:38:43.000Z",            "PrivateIpAddress": "172.31.22.52",            "ProductCodes": [],            "VpcId": "vpc-4cddce2a",            "CpuOptions": {                "CoreCount": 1,                "ThreadsPerCore": 1            },            "StateTransitionReason": "",            "InstanceId": "i-057e8deb1a4c3f35d",            "ImageId": "ami-cfe4b2b0", "PrivateDnsName": ...

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.