Zappa is a Python tool to build and deploy server-less, event-driven Python applications (including, but not limited to, WSGI web apps) on AWS Lambda + API Gateway.
Questions tagged [zappa]
241 questions
16
votes
11 answers
Zappa deployment error : GET request yields 502 response code
I am trying to deploy the first zappa example app built with Flask-Ask, It looks like everything works good but after the Deploying API statement I get the following error :
Error: Warning! Status check on the deployed lambda failed. A GET request…

s_om
- 661
- 2
- 9
- 24
13
votes
2 answers
django-zappa: Error loading psycopg2 module: libpq.so.5: cannot open shared object file: No such file or directory
When trying to deploy a Django project using django-zappa, I get the following error in the zappa tail output:
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: libpq.so.5: cannot open shared object file: No such file or…

OhMad
- 6,871
- 20
- 56
- 85
12
votes
2 answers
Zappa deploy fails with AttributeError: 'Template' object has no attribute 'add_description'
Since a few days ago, zappa deploy fails with the following error (zappa version 0.50.0):
Traceback (most recent call last):
File "/root/repo/venv/lib/python3.6/site-packages/zappa/cli.py", line 2785, in handle
sys.exit(cli.handle())
File…

nbeuchat
- 6,575
- 5
- 36
- 50
10
votes
5 answers
ImproperlyConfigured: Error loading psycopg2 module: No module named 'psycopg2._psycopg' zappa
I am using zappa to deploy backend to the AWS Lambda. It worked well, until I decided to use PostgreSQL. I added it in the settings like this:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME':…

Viktor Vostrikov
- 1,322
- 3
- 19
- 36
10
votes
2 answers
Zappa / Async AWS Lambda Function times out in 30s
I have a Python 3.6 - Flask application deployed onto AWS Lambda using Zappa, in which I have an asynchronous task execution function defined using @Task as discussed here
However, I find that the function call still times out at 30 seconds as…

kilokahn
- 1,136
- 2
- 18
- 38
8
votes
3 answers
Zappa: UpdateFunctionConfiguration operation: The operation cannot be performed at this time. An update is in progress for resource
I am try update a lambda by zappa, I created virtualenv and active virtualenv and install libraries, but in the moment run zappa update enviroment, I have this problem:
How can i fix this :(
zappa update qa
(pip 18.1…

daniel____
- 93
- 1
- 7
8
votes
1 answer
Where does zappa upload environment variables to?
tl;dr
Environment variables set in a zappa_settings.json don't upload as environment variables to AWS Lambda. Where do they go?
ts;wm
I have a Lambda function configured, deployed and managed using the Zappa framework. In the zappa_settings.json I…

Josh
- 1,517
- 1
- 13
- 21
8
votes
1 answer
Python AWS Lambda deploy - Zappa package without Zappa requirements
I want to package and deploy a simple project on AWS Lambda, using Zappa, but without the Zappa requirements overhead.
Given this simple scenario:
lambda_handler.py
def handle(event, context):
print('Hello World')
I have a deploy.sh script…

joaoricardo000
- 4,764
- 4
- 25
- 36
8
votes
2 answers
zappa custom authorizer for flask with cors
I am using flask-cors for a aws python aws lambda API. I deployed it with zappa, it worked as intended. Yet cors does not work with custom authorizer
inspired by…

Serge
- 3,387
- 3
- 16
- 34
7
votes
1 answer
Unable to import module 'handler': No module named 'werkzeug'
I suddenly started getting this error on a Django + AWS lambda setup with zappa. I'm using ubuntu 18.04 image on bitbucket pipelines to trigger the deployment.
Unable to import module 'handler': No module named 'werkzeug'
It was working fine for…

sa77
- 3,563
- 3
- 24
- 37
7
votes
2 answers
Asynchronous task queue for serverless AWS Lambda / Django / Zappa
I have been experimenting with deploying Django apps to AWS Lambda with Zappa.
In some of my other (EC2/EBS hosted) Django projects, if there is a need to perform some heavier calculation that can take some time (such as sending a lot of emails, or…

tuoppimas
- 131
- 1
- 4
6
votes
2 answers
If I plan to use Node, is it a mistake to jump right in to a CoffeeScript framework like Zappa?
I haven't used much JavaScript since the early 00s, and I'm starting to see that my current app is well suited for Node.js. But as a ruby developer, coffeescript looks like it will be more my forte. But I'm concerned that if I jump right into a…

Jeremy Smith
- 14,727
- 19
- 67
- 114
6
votes
2 answers
Request takes too long to Django app deployed in AWS Lambda via Zappa
I have recently deployed a Django backend application to AWS Lambda using Zappa.
After the lambda function has not been invoked for some time, the first request to be made takes from 10 to 15 seconds to be processed. At first I thought it would be…

Zufra
- 574
- 1
- 7
- 16
6
votes
1 answer
Getting "ERROR: Double requirement given: setuptools" error in zappa
I tried to deploy my Flask app with zappa==0.52.0, but I get an error as below;
ERROR: Double requirement given: setuptools (already in setuptools==52.0.0.post20210125, name='setuptools')
WARNING: You are using pip version 20.2.3; however, version…

tolang0825
- 61
- 2
6
votes
1 answer
Zappa not packaging nested source directories
I have a python application that I am trying to deploy with zappa. The root level of my directory has the application and a directory named helper. The structure looks like this:
|-app.py
|-zappa_settings.json
|-helper
|-api.py
…

medium
- 4,136
- 16
- 55
- 66