Last active
November 27, 2017 07:14
-
-
Save jsyi/563293932419440957cbe39cfa473ab3 to your computer and use it in GitHub Desktop.
See how many application versions each Elastic Beanstalk application is using from the command line. Useful for monitoring how close we are to AWS Service Limits.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires AWS CLI Tools (https://aws.amazon.com/cli) and jq (https://stedolan.github.io/jq) | |
# AWS CLI must be configured with access key with approperiate role/permissions | |
aws elasticbeanstalk describe-application-versions --query "ApplicationVersions[*].ApplicationName" | jq '{"total": length, "lists": group_by(.)} | {"Applications": [ (.lists[] | {"Application": .[0], "Versions": length })], "Total Versions": .total }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment