Skip to content

Instantly share code, notes, and snippets.

@w0rldart
Last active January 29, 2018 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save w0rldart/5b40e9d81ec6534e4a738ceba2bcab27 to your computer and use it in GitHub Desktop.
Save w0rldart/5b40e9d81ec6534e4a738ceba2bcab27 to your computer and use it in GitHub Desktop.
Useful aws cli commands

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment