Using Python/Boto List number of instances associated with each Security Group in AWS

List number of instances associated with each Security Group

import boto

ec2 = boto.connect_ec2()

sgs = ec2.get_all_security_groups()

for sg in sgs:
    print(sg.id + '\t' + sg.name  + '\t\t\t' +  str(len(sg.instances())))


Comments

  1. The best thing is that your blog really informative thanks for your great information!
    erp providers in chennai

    ReplyDelete
  2. I heve read your blog it's very interesting and informative. Keep sharing.
    erp in chennai | erp software solutions in chennai

    ReplyDelete
  3. I found a lot of interesting information here. A really good post
    office 2011 mac download deutsch

    ReplyDelete

Post a Comment

Popular posts from this blog

Basic Send Message to MQ with Java and IBM MQ JMS

Basic Receive Message to MQ with Java and IBM MQ JMS

Creating a simple Alert / Success Message with ASP.NET/VB using Bootstrap