A tool for running Zappa commands in a Lambda-like' environment.
Project description
ZappaDock
About
This package makes dealing with Zappa a walk in the park.
How ?
Zappa runs Flask/Django web apps on AWS Lambda.
We LOVE Zappa. However it's not the MOST user-friendly application ever.
Why ?
You see, Zappa builds all your requirements before uploading your app to AWS Lambda. However, pip downloads the packages that are compatible with the computer it is running on, so when Zappa uploads it to AWS Lambda, many packages don't work (notably psycopg2
among others).
What's the solution ?
The solution recommend by the The Django Guide for Zappa is to run your Zappa commands in a docker container similar to the one that AWS Lambda uses.
This will ensure that all the dependencies will be AWS Lambda compatible.
This ZappaDock streamlines the workflow.
What Does ZappaDock Do ?
ZappaDock does 3 things.
- Run a docker container with your code mounted.
- Load your AWS Credentials from the
~/.aws
folder and environmental variables into the container. - Create and activate a virtual environment inside the container.
So now you can test and deploy your code confident that it will work once deployed.
Install
It's dead simple :
$ pip install zappadock
Usage
- Make sure Docker is installed by running
docker info
command from a terminal. - Set your AWS credentials in environmental variables or in the
~/.aws
folder. See the Amazon Docs for more information. - Run
zappadock
in the directory you wish to run your Zappa commands.
Your directory will be loaded in a docker container, and a virtual environment will be created and activated.
If you have any problems, open a issue and we'll figure it out.
Contributing
I mostly made this for myself. If you want to help make this a masterpiece, be a sport and contribute.
Thanks!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for zappadock-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c0cde8ea5a077ccb9783d1da71850e348ed41132dcd291877e41690e2735101 |
|
MD5 | f4937855dfcf06338853e9ed568f4f72 |
|
BLAKE2b-256 | 9b2b661ca36a786ffd479e22e5ae1857420c3bfde23813c4d25eb8361ac8797c |