Reputation: 325
I wish to find which security groups refers only to another security group and not to EC2 instance (for example). http://boto3.readthedocs.io/en/latest/reference/services/ec2.html#EC2.Client.describe_security_group_references is only for VPCs.
Upvotes: 0
Views: 527
Reputation: 45856
You are correct that describe_security_group_references
is supported only for VPC and only for groups involved in a peering connection. This is not a limitation of boto3 but, rather, of the EC2 API.
To get the equivalent functionality for non-VPC security groups you would have to retrieve all of those groups via describe_security_groups
and then write your own code to find the groups which only reference other groups.
Upvotes: 1