-
-
Save jaga-me/177420a4e4937519fdc6d63b27cbca4b to your computer and use it in GitHub Desktop.
deletes old versions of lambdas that aren't aliased
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 | |
fnlist=( | |
'SAMPLE FUNCTION' | |
'ADD MORE FUNCTIONS HERE' | |
) | |
count=0 | |
while [ "x${fnlist[count]}" != "x" ] | |
do | |
for (( i=1; i<=$1; i++ )) | |
do | |
aws lambda delete-function --function-name ${fnlist[count]} --qualifier $i | |
echo "lambda ${fnlist[count]} version $i was deleted" | |
done | |
count=$(( $count + 1 )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment