You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Add extra installs to the Dockerfile.update file, then run:
$ docker build --build-arg version=< zappa version > -t danielwhatmuff/zappa:< zappa version > -f Dockerfile.update .
# e.g.
$ docker build --build-arg version=0.38.1 -t danielwhatmuff/zappa:0.38.1 -f Dockerfile.update .
Or pull the image from Docker Hub
$ docker pull danielwhatmuff/zappa
Using exported AWS_DEFAULT_REGION, AWS_SECRET_ACCESS_KEY and AWS_ACCESS_KEY_ID env vars
$ alias zappashell='docker run -ti -e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -e AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID -e AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION -v $(pwd):/var/task --rm danielwhatmuff/zappa bash'
$ alias >> ~/.bash_profile
$ cd yourzappaproject
$ zappashell
# Create a persistent virtualenv within the mounted volume and activate it
zappashell> virtualenv venv
zappashell> source venv/bin/activate
# OR use the prebaked one...
zappashell> source /var/venv/bin/activate
# Install your requirements
zappashell> pip install -r requirements.txt
# Deploy the thing
zappashell> zappa deploy
# Update the thing
zappashell> zappa update
Using cross account IAM role from CLI config ~/.aws/credentials or ~/.aws/config
Example CLI config:-
[profile myprofile]
region = ap-southeast-2
role_arn = arn:aws:iam::ACCOUNTNUMBER:role/YourCrossAccountAssumableRole
Export the AWS_PROFILE to the profile name myprofile
On Mac - if you leave the Docker daemon running for too long, you will get time drift and zappa commands will fail with the below types of errors (so will AWS CLI commands) - to fix, just restart the daemon
Error: No Lambda ... detected in ... - have you deployed yet?
Warning! Couldn't get function ... in ... - have you deployed yet?
About
Zappa Docker image based on Lambda compatible base