Skip to content

Instantly share code, notes, and snippets.

@SkaTeMasTer
Created October 1, 2016 03:30
Show Gist options
  • Save SkaTeMasTer/2624a9f51e1f8fe464b2923c9b96e401 to your computer and use it in GitHub Desktop.
Save SkaTeMasTer/2624a9f51e1f8fe464b2923c9b96e401 to your computer and use it in GitHub Desktop.
List security groups for ec2 instances
# list security groups for ec2 instances
aws ec2 describe-security-groups --query "SecurityGroups[].GroupId | [0]" --output text
output:
si-22642348 sg-11662348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment