123456789101112131415161718 |
- #! /bin/bash
- #
- # Prints security group details given a profile and an ID
- # You can decide for yourself which is easiest to read. Options are
- # 'json', 'text', or 'table'
- OUTPUT=json
- if [ $# -ne 3 ]; then
- echo Usage: $0 "<profile> <region> <groupid>"
- exit 1
- fi
- PROFILE=$1
- REGION=$2
- SG=$3
- aws ec2 describe-security-groups --profile $PROFILE --region $REGION --output $OUTPUT --group-ids $SG
|