Created
June 26, 2014 18:43
-
-
Save cjhanks/dcc54e8b908e30b7500d to your computer and use it in GitHub Desktop.
ListByTag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto | |
def gather_hosts(): | |
for reservation in boto.connect_ec2().get_all_instances( | |
filters = { 'tag:purpose' : 'ingestion' }): | |
for instance in reservation.instances: | |
print(instance.public_dns_name) | |
print(instance.private_ip_address) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment