Created
June 26, 2019 12:12
-
-
Save medwig/0357efd48bb83ec35bb1fba1fc693d06 to your computer and use it in GitHub Desktop.
Download AWS lambda function package cli
This file contains 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
#!/usr/bin/env bash | |
# Download AWS lambda function package | |
# Add to ~/.bashrc | |
getLambda() { | |
functionName=$1 | |
awsProfile=${2:-default} | |
echo "Getting lambda function $functionName on account $awsProfile" | |
aws lambda get-function --function-name $functionName --query 'Code.Location' --profile $awsProfile | | |
xargs wget -O lambda.zip | |
unzip lambda.zip -d $functionName | |
rm lambda.zip | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment