Skip to content

Instantly share code, notes, and snippets.

@bionix
Created March 21, 2017 13:26
Show Gist options
  • Save bionix/fb161e6460187e158c61a389e4a0cc9d to your computer and use it in GitHub Desktop.
Save bionix/fb161e6460187e158c61a389e4a0cc9d to your computer and use it in GitHub Desktop.
awslsa
#!/bin/sh
# script: awslsa
aws ec2 describe-instances --query 'Reservations[*].Instances[*].[InstanceId,State.Name,InstanceType,PrivateIpAddress,PublicIpAddress,PrivateDnsName,PublicDnsName,Tags[?Key==`Name`].Value[]]' --output json | tr -d '\n[] "' | perl -pe 's/i-/\ni-/g' | tr ',' '\t' | sed -e 's/null/None/g' | grep '^i-' | column -t
# EOF
@bionix
Copy link
Author

bionix commented Mar 21, 2017

my little shell script to get an fast overview of aws instances (with aws cli)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment