Skip to content

Instantly share code, notes, and snippets.

@JoaoCarabetta
Last active February 25, 2019 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaoCarabetta/7e63f064a6a9528f9e5baf3d20313e01 to your computer and use it in GitHub Desktop.
Save JoaoCarabetta/7e63f064a6a9528f9e5baf3d20313e01 to your computer and use it in GitHub Desktop.
Update python function to AWS lambda
# update-function-code-aws-lambda.sh <function path> <lambda-function-name>
# make sure that the aws-cli is configured in the same region and with a user with permission
rm temp.zip
echo ------ Zipping --------
cp $1 lambda_function.py
zip temp.zip lambda_function.py
rm lambda_function.py
echo ------ Updating Lambda ------
aws lambda update-function-code --function-name $2 --zip-file "fileb://temp.zip"
rm temp.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment