Skip to content

Instantly share code, notes, and snippets.

@tuergeist
Created January 9, 2019 15:53
Show Gist options
  • Save tuergeist/6b0096fb8dc0d0182e4ea7138d77d3ea to your computer and use it in GitHub Desktop.
Save tuergeist/6b0096fb8dc0d0182e4ea7138d77d3ea to your computer and use it in GitHub Desktop.
Backup all your AWS lambda functions code to local disk
for funcname in $(aws lambda list-functions| jq -rc '.Functions|.[]|.FunctionName') ; do
echo -n $funcname ...
wget $(aws lambda get-function --function-name $funcname | jq -rc '.Code.Location') -O $funcname -o /dev/null && echo ok || echo failed
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment