Skip to content

Instantly share code, notes, and snippets.

@SoarLin
Created September 2, 2018 07:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save SoarLin/eb99e4b18ff707a17196a53c7bdd7446 to your computer and use it in GitHub Desktop.
aws-lambda-image_makefile
lambda:
npm install .
@echo "Factory package files..."
. . . . . . .
@echo "Create package archive..."
@cd build && zip -rq aws-lambda-image.zip .
@mv build/aws-lambda-image.zip ./
uploadlambda: lambda
@if [ -z "${LAMBDA_FUNCTION_NAME}" ]; then (echo "Please export LAMBDA_FUNCTION_NAME" && exit 1); fi
aws lambda update-function-code --function-name ${LAMBDA_FUNCTION_NAME} --zip-file fileb://aws-lambda-image.zip
clean:
@echo "clean up package files"
@if [ -f aws-lambda-image.zip ]; then rm aws-lambda-image.zip; fi
@rm -rf build/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment