Skip to content

Instantly share code, notes, and snippets.

@taross-f
Last active December 10, 2018 02:53
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 taross-f/778a0e40707299a7159dde829bcf94e3 to your computer and use it in GitHub Desktop.
Save taross-f/778a0e40707299a7159dde829bcf94e3 to your computer and use it in GitHub Desktop.
deploy lambda
#!/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