Skip to content

Instantly share code, notes, and snippets.

@ekaitz-zarraga
Created March 18, 2016 14:59
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 ekaitz-zarraga/f15df9bba7c7ffae707d to your computer and use it in GitHub Desktop.
Save ekaitz-zarraga/f15df9bba7c7ffae707d to your computer and use it in GitHub Desktop.
AWS Python Lambda function ZIP creator
# Source code
SRCS = lambda_function.py # This is the minimum code. Add more if needed.
# Insert your libs as folders in root folder
#LIBS = psycopg2 # EXAMPLE
TARGET = deploy.zip
# Creates ZIP ready to upload it to Amazon Web Services Lambda
zip: $(TARGET)
$(TARGET): $(SRCS) $(LIBS)
zip $(TARGET) $(SRCS) $(LIBS) -r
clean:
rm $(TARGET)
.PHONY: clean zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment