Skip to content

Instantly share code, notes, and snippets.

@samdoran
Last active August 23, 2017 17:41
Show Gist options
  • Select an option

  • Save samdoran/963b156ad0d8d2bb81b81b7a5891e2dd to your computer and use it in GitHub Desktop.

Select an option

Save samdoran/963b156ad0d8d2bb81b81b7a5891e2dd to your computer and use it in GitHub Desktop.
ec2.py output
{
"instances": [
{
"kernel": null,
"root_device_type": "ebs",
"private_dns_name": "ip-172-31-23-35.us-east-2.compute.internal",
"public_ip": "18.220.201.254",
"private_ip": "172.31.23.35",
"id": "i-02d9de367d3e62929",
"ebs_optimized": false,
"state": "running",
"virtualization_type": "hvm",
"root_device_name": "/dev/sda1",
"ramdisk": null,
"block_device_mapping": {
"/dev/sdb": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-09d37ad78f23019bc"
},
"/dev/sda1": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-068346e3a31d8102b"
},
"/dev/sdc": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-0895e370d6b17262c"
}
},
"key_name": "sdoran@aws",
"image_id": "ami-f857709d",
"tenancy": "default",
"groups": {
"sg-4bddce22": "Ansibullbot"
},
"public_dns_name": "ec2-18-220-201-254.us-east-2.compute.amazonaws.com",
"state_code": 16,
"tags": {
"Name": "sdoran-testing"
},
"placement": "us-east-2b",
"ami_launch_index": "0",
"dns_name": "ec2-18-220-201-254.us-east-2.compute.amazonaws.com",
"region": "us-east-2",
"launch_time": "2017-08-23T12:42:19.000Z",
"instance_type": "t2.micro",
"architecture": "x86_64",
"hypervisor": "xen"
},
{
"kernel": null,
"root_device_type": "ebs",
"private_dns_name": "ip-172-31-20-175.us-east-2.compute.internal",
"public_ip": "18.220.194.207",
"private_ip": "172.31.20.175",
"id": "i-0e390665749b9a6ad",
"ebs_optimized": false,
"state": "running",
"virtualization_type": "hvm",
"root_device_name": "/dev/sda1",
"ramdisk": null,
"block_device_mapping": {
"/dev/sdb": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-008c7858c1ef2d760"
},
"/dev/sda1": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-014b58dd53e1a7440"
},
"/dev/sdc": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-0c010fc309aed7073"
}
},
"key_name": "sdoran@aws",
"image_id": "ami-f857709d",
"tenancy": "default",
"groups": {
"sg-4bddce22": "Ansibullbot"
},
"public_dns_name": "ec2-18-220-194-207.us-east-2.compute.amazonaws.com",
"state_code": 16,
"tags": {
"Name": "sdoran-testing"
},
"placement": "us-east-2b",
"ami_launch_index": "1",
"dns_name": "ec2-18-220-194-207.us-east-2.compute.amazonaws.com",
"region": "us-east-2",
"launch_time": "2017-08-23T12:42:19.000Z",
"instance_type": "t2.micro",
"architecture": "x86_64",
"hypervisor": "xen"
}
],
"changed": true,
"tagged_instances": [
{
"kernel": null,
"root_device_type": "ebs",
"private_dns_name": "ip-172-31-23-35.us-east-2.compute.internal",
"public_ip": "18.220.201.254",
"private_ip": "172.31.23.35",
"id": "i-02d9de367d3e62929",
"ebs_optimized": false,
"state": "running",
"virtualization_type": "hvm",
"root_device_name": "/dev/sda1",
"ramdisk": null,
"block_device_mapping": {
"/dev/sdb": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-09d37ad78f23019bc"
},
"/dev/sda1": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-068346e3a31d8102b"
},
"/dev/sdc": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-0895e370d6b17262c"
}
},
"key_name": "sdoran@aws",
"image_id": "ami-f857709d",
"tenancy": "default",
"groups": {
"sg-4bddce22": "Ansibullbot"
},
"public_dns_name": "ec2-18-220-201-254.us-east-2.compute.amazonaws.com",
"state_code": 16,
"tags": {
"Name": "sdoran-testing"
},
"placement": "us-east-2b",
"ami_launch_index": "0",
"dns_name": "ec2-18-220-201-254.us-east-2.compute.amazonaws.com",
"region": "us-east-2",
"launch_time": "2017-08-23T12:42:19.000Z",
"instance_type": "t2.micro",
"architecture": "x86_64",
"hypervisor": "xen"
},
{
"kernel": null,
"root_device_type": "ebs",
"private_dns_name": "ip-172-31-20-175.us-east-2.compute.internal",
"public_ip": "18.220.194.207",
"private_ip": "172.31.20.175",
"id": "i-0e390665749b9a6ad",
"ebs_optimized": false,
"state": "running",
"virtualization_type": "hvm",
"root_device_name": "/dev/sda1",
"ramdisk": null,
"block_device_mapping": {
"/dev/sdb": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-008c7858c1ef2d760"
},
"/dev/sda1": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-014b58dd53e1a7440"
},
"/dev/sdc": {
"status": "attached",
"delete_on_termination": true,
"volume_id": "vol-0c010fc309aed7073"
}
},
"key_name": "sdoran@aws",
"image_id": "ami-f857709d",
"tenancy": "default",
"groups": {
"sg-4bddce22": "Ansibullbot"
},
"public_dns_name": "ec2-18-220-194-207.us-east-2.compute.amazonaws.com",
"state_code": 16,
"tags": {
"Name": "sdoran-testing"
},
"placement": "us-east-2b",
"ami_launch_index": "1",
"dns_name": "ec2-18-220-194-207.us-east-2.compute.amazonaws.com",
"region": "us-east-2",
"launch_time": "2017-08-23T12:42:19.000Z",
"instance_type": "t2.micro",
"architecture": "x86_64",
"hypervisor": "xen"
}
],
"instance_ids": [
"i-02d9de367d3e62929",
"i-0e390665749b9a6ad"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment