Created
November 11, 2011 17:01
-
-
Save robballou/1358548 to your computer and use it in GitHub Desktop.
Get the instance DNS names for an AWS security group using boto
This file contains hidden or 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
from boto.ec2.connection import EC2Connection | |
ec2 = EC2Connection() | |
reservations = ec2.get_all_instances(None, {'group-name': 'Your Group Name'}) | |
dns_names = [instance[0].dns_name for instance in [reservation.instances for reservation in reservations]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What IAM credentials do you use with this setup ?