Skip to content

Instantly share code, notes, and snippets.

@dijeesh
Created May 29, 2019 11:57
Show Gist options
  • Select an option

  • Save dijeesh/bb79298623e148c9dd4683a6f8ae2bf7 to your computer and use it in GitHub Desktop.

Select an option

Save dijeesh/bb79298623e148c9dd4683a6f8ae2bf7 to your computer and use it in GitHub Desktop.
comm -23 <(aws ec2 describe-security-groups --query 'SecurityGroups[*].GroupId' --output text | tr '\t' '\n'| sort) <(aws ec2 describe-instances --query 'Reservations[*].Instances[*].SecurityGroups[*].GroupId' --output text | tr '\t' '\n' | sort | uniq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment