Discover Unused Security Groups

Discover unused security groups.
Resources checked:

  • ENI
  • EC2
  • RDS
  • ELB
  • ELBv2
  • Lambda
  • Redshift
  • ElastiCache
  • EMR
  • ECS
  • Neptune
  • OpenSearch
  • MSK

Source codePermissions

Usage

Input

Parameter Description Type Required Default value
region Region for operation string No Session default
debug Increase log verbosity bool No False
silent Decrease log verbosity bool No False
output Output format
table
string No None
session Established session object No None

Output

Returns a list of discovered security group IDs:

['sg-1234567890abcdef0', 'sg-abcdef1234567890']

Examples

Discover unused security groups:

aaws ec2 discover_unused_security_groups --region us-east-1