Skip to content

Commit ebb41fc

Browse files
committed
help for clearing AWS account
1 parent 51c60e5 commit ebb41fc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scripts/delete-all-lambda-functions

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
echo "functions to delete:"
4+
aws lambda list-functions | jq -r '.Functions | .[] | .FunctionName' |
5+
while read uname1; do
6+
echo " $uname1";
7+
done
8+
9+
read -p "Are you sure? " -n 1 -r
10+
echo # (optional) move to a new line
11+
if [[ ! $REPLY =~ ^[Yy]$ ]]
12+
then
13+
exit 1
14+
fi
15+
16+
aws lambda list-functions | jq -r '.Functions | .[] | .FunctionName' |
17+
while read uname1; do
18+
echo "deleting $uname1";
19+
aws lambda delete-function --function-name $uname1;
20+
done

0 commit comments

Comments
 (0)