Packaging local python dependencies for Zappa deployment
One of the solutions is to install the package in your virtual environment (pip install .
in the commons directory). Zappa would use all the packages that are installed in it.
Of course, this is a bit cumbersome because you'd need to re-install the package every time you modify it. You can either:
- Create a script that would help you by re-installing and then calling
zappa deploy
. - Try to create your own module and register it in the
callbacks
section of zappa_settings.json. This module would be called by the deployment/update process and could theoretically re-install the package beforehand. However, this is option is just my guess that it might be possible. I've never tried anything like that.