Compilation of useful AWS CLI commands that I accumulate over time
Don't forget to export AWS_DEFAULT_PROFILE=MyMagicalAWSProfile
:)
# Find NICs that are allocated to a specific security group | |
aws ec2 describe-network-interfaces --filters "Name=group-id,Values=sg-a1bf3ed9" --query "NetworkInterfaces[*].[TagSet[?Key == 'Name'].Value | [0],Description,NetworkInterfaceId]" --output table | |
# Find Launch Configurations that use a specific security group | |
aws autoscaling describe-launch-configurations --query "LaunchConfigurations[?contains(SecurityGroups, 'sg-a2bf45d9')].LaunchConfigurationName" |