Skip to content

Instantly share code, notes, and snippets.

@micha
Last active January 17, 2017 15:50
Show Gist options
  • Save micha/b3b6f77efa90971d8245512118a43cce to your computer and use it in GitHub Desktop.
Save micha/b3b6f77efa90971d8245512118a43cce to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
aws autoscaling describe-auto-scaling-groups \
|jt AutoScalingGroups \
[ Tags [ Key % ] [ Value % ] ] \
[ Tags [ Key % ] [ Value % ] ] \
|awk -F ' ' "\$1 == \"AhApplication\" && \$2 == \"$AH_APP\" && \$3 == \"AhEnvironment\" {print \$4}" \
|sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment