Skip to content

Instantly share code, notes, and snippets.

@syncsynchalt
Created February 24, 2015 22:12
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 syncsynchalt/a7b495eb99e6c113120e to your computer and use it in GitHub Desktop.
Save syncsynchalt/a7b495eb99e6c113120e to your computer and use it in GitHub Desktop.
describe all
# AWS
alias dall="aws ec2 describe-instances | python -c \"import sys,json
j = json.load(sys.stdin)
for r in j['Reservations']:
for i in r['Instances']:
if not 'PublicIpAddress' in i: continue
n = 'noname'
if 'Tags' in i:
for t in i['Tags']:
if t['Key'] == 'Name': n = t['Value']
print i['LaunchTime'], n, i['PublicDnsName']\" | sed -e 's/.000Z//' | sort"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment