Zappa is a framework to build out and deploy serverless python applications.
Questions tagged [python-zappa]
39 questions
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
4
votes
1 answer
How to keep lambda warm using zappa python
I have an API function in python and deployed it on aws lambda using zappa. When I am hitting my API after 15 minutes time its taking atleast 5 to 10 seconds to respond (which is too long for my API) for first request. I have came to know about cold…

naveen chary
- 79
- 6
3
votes
1 answer
Django deployment with Zappa - root URL is wrong
I have successfully set up a Django app following a Zappa tutorial I found. However, the problem is that Zappa deploys my app to the location:
https://some-aws-address/devel
where "devel" is the name of my particular Zappa deployment.
The problem…

Hayden Eastwood
- 928
- 2
- 10
- 20
2
votes
0 answers
How to manage zappa settings to dev environment using django
What is the best practices to manage dev enviroment using zappa? Currently I have my zappa_settings.json in my project and inside it I have api urls, keys etc. when I deploy It to AWS these keys will be used correctly like:
API_KEY =…

Leonardo Furtado
- 91
- 1
- 9
2
votes
1 answer
Error when using Zappa to deploy lambda: when calling the UpdateFunctionCode operation: Unzipped size must be smaller than 262144000 bytes
I'm getting the error message "unzipped size must be smaller than 262144000 bytes" when I try to upload to AWS Lambda using Zappa. Reading a previous thread I was told that i need to add :
"slim_handler": true to handle files greater than 50MB in…

DSi
- 93
- 6
2
votes
1 answer
How to make zappa work with my python 3.9 version?
I am trying to do zappa init but unfortunately I get this error :
Traceback (most recent call last):
File "/usr/local/bin/zappa", line 5, in
from zappa.cli import handle
File…

John doe
- 3,680
- 7
- 31
- 65
2
votes
0 answers
zappa is ignoring flask project log messages
I have a flask project which i want to deploy on aws environment using zappa.
i packaged my flask application and placed in S3. my ci/cd will take care of running this packaged file as a lambda.
Issue:
Basically my flask project contains custom…

siva
- 549
- 7
- 25
2
votes
4 answers
AttributeError: module 'dateutil.tz' has no attribute 'UTC' on Zappa Deploy
On trying to deploy my AWS Lambda function get this error on my Stacktrace
(python-dateutil 2.8.1 (/Users/supratik/.local/share/virtualenvs/api_sourcer-sM-JSZy3-/Users/supratik/.pyenv/shims/python/lib/python3.6/site-packages),…

Supratik Majumdar
- 2,365
- 1
- 23
- 31
2
votes
1 answer
New branch/stage using Zappa
I currently have an API up on AWS Lambda using Zappa/Flask (Py 3.7)
My zappa_Settings.json file looks like so:
{
"beta": {
"app_function": "application.application",
"profile_name": "changed",
"project_name": "changed",
…

kilokahn
- 1,136
- 2
- 18
- 38
2
votes
0 answers
Web2py Zappa AWSLamda
Can someone please tell me, How can I deploy the Web2py Application to AWS Lamda using zappa. The configuration for django is somewhat this:
{
"dev": {
"django_settings": "frankie.settings",
"s3_bucket": "zappatest-code"
}
}
Any help…

ARKhan
- 1,724
- 22
- 30
2
votes
0 answers
Django admin site redirecting to wrong location
I have a Django app, being deployed to Amazon Lambda using zappa. The admin routes are registered under /api, and when deployed, they get further deployed to /int, so the admin site is available under /int/api/admin/.
However, this site is served…

Chris B.
- 85,731
- 25
- 98
- 139
1
vote
1 answer
How to automatically change lambda layer version in zappa_settings.json file while publishing a new lambda layer version?
I have a lambda layer set up, and a shell file that deploys it. I have written github workflows that triggers this shell file whenever there's a change in code in that particular repository. Since a newer version is published, I would like to change…

Avinash Singh
- 21
- 1
1
vote
1 answer
ImportError while using AWS Lambda in Python (via zappa serverless); Numpy
I have an ImportError issue with my AWS Lambda function
I can run this code locally without ImportError
I use zappa serverless for uploading my code to AWS Lambda--which requires a virtual environment and is an end-to-end solution for creating and…

smgeneralist
- 105
- 3
- 8
1
vote
0 answers
If statement in Github actions if Zappa already deploy application
How do I specify whether to zappa deploy or zappa update my application in Github actions with some sort of if statement
My Workflow Actions as per below
name: Dev Deploy
on:
push:
branches:
- mybranch
jobs:
dev-deploy:
name:…

KerryKazadi
- 11
- 2
1
vote
0 answers
Specify a library version in zappa deploy
I am working on a very barebones zappa app that imports a few libraries and displays a success string.
numpy is giving me issues and one solution I've read is to revert from the current version (1.21.2) to a previous version (1.19.4). My process…

ScottieB
- 3,958
- 6
- 42
- 60