George McKinney Adventures in Software Development

March 10, 2021

AWS BASH Export Lambda Functions

Filed under: AWS — georgemck @ 6:18 pm

AWS CLI 2 for Exporting Lambdas

https://gist.github.com/TheNetJedi/0847ba0ec1da9879b4fa1d8f3276b004

Export all lambda functions to lambdafunctions directory as indivudual zip files. Be sure to update the region, currently set to us-east-1

 

mkdir lambdafunctions
aws lambda list-functions | \
grep FunctionName | \
cut -d '"' -f4 | \
while read -r name; do
aws lambda get-function --function-name $name | tail -n 3 | egrep -o 'https?://[^ ]+' | sed 's/"//' | xargs wget -O ./lambdafunctions/$name.zip
done

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

Powered by WordPress