title: Boto3 List all the rules in each aws security group
body: <p>To get all group I used: </p>
  
  <pre><code>groups = list(ec2.security_groups.all())
  </code></pre>
  
  <p>Then:</p>
  
  <pre><code>rules = []
  for grp in groups:
     sgid =  grp.group_id
     try:
         response = ec2_client.describe_security_groups(GroupIds=[sgid])
         rules.append(response)
     except ClientError as e:
         print(e)
  </code></pre>
  
  <p>I'm left with a nasty json to parse :-(.  </p>