Intension of this repo is to make zappa deployment agnostic of your machine
Lambda are deployed on docker based on lambdaci in aws, we are building stuff on that
Steps to achieve this
- this will create a docker image name zappashell on your machine
docker build -t zappashell -f zappa-dockerfile .
- now add this to your .bash_profile
alias zappashell='[[ -f zappa_settings.json ]] && docker run -ti -e AWS_PROFILE=dataorc -v $(pwd):/var/task -v ~/.aws/:/root/.aws --rm zappashell bash'
what it will do is it will mount current directory and aws credential directory into the docker
- go to your zappa directory(containing zappa_settings.json) and run (dont forget to source ~/.bash_profile)
zappashell
- install virtual environment env(one time for one repo, this is add venv directory in your directory, add that in your gitignore and zappa_settings.json)
virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
zappa deploy or zappa update
Caveat add below to avoid including virtualenv we created above in package
...
"exclude" : ["venv*"],
...
Happy Lambda !!