Last active
December 10, 2018 02:53
-
-
Save taross-f/778a0e40707299a7159dde829bcf94e3 to your computer and use it in GitHub Desktop.
deploy lambda
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
#!/bin/bash | |
FUNCTION_NAME= | |
PROFILE=default | |
if [ $# -eq 1 ]; then | |
PROFILE=$1 | |
fi | |
set -x | |
python -m compileall . | |
rm -rf /tmp/${FUNCTION_NAME}.zip | |
zip -r /tmp/${FUNCTION_NAME}.zip ./* | |
aws lambda \ | |
update-function-code \ | |
--profile ${PROFILE} \ | |
--function-name ${FUNCTION_NAME} \ | |
--zip-file fileb:///tmp/${FUNCTION_NAME}.zip \ | |
--publish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment