Last active
January 3, 2017 17:19
-
-
Save timdp/e8114b8f7c7ba87a5f3de8c8711a36be to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
set -e | |
region=${1:-us-east-1} | |
count=${2:-100} | |
aws --region $region elasticbeanstalk describe-application-versions | | |
jq -r '.ApplicationVersions[] | .ApplicationName + " " + .VersionLabel' | | |
head -$count | | |
while read app label; do | |
echo "Deleting: $app @ $label" | |
aws --region $region elasticbeanstalk delete-application-version --application-name "$app" --version-label "$label" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment