Skip to content

Instantly share code, notes, and snippets.

@Cnly
Last active January 4, 2018 08:34
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 Cnly/49e91b636024c28c62c00fbd91297a9c to your computer and use it in GitHub Desktop.
Save Cnly/49e91b636024c28c62c00fbd91297a9c to your computer and use it in GitHub Desktop.
Make deploy.zip for AWS Lambda
#! /usr/bin/env bash
rm -f deploy.zip
zip -9 -r deploy.zip . --exclude 'venv/*' '.*/*' '.*' '__pycache__/*'
cd venv/lib/python*/site-packages || exit 1
zip -9 -r ../../../../deploy.zip * --exclude 'setuptools-*/*' 'setuptools/*' 'pip-*/*' 'pip/*' 'pkg_resources-*/*' 'pkg_resources/*' 'wheel-*/*' 'wheel/*' '__pycache__/*' '*-info/*' 'easy_install.py'
cd ../../../../
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment