ModuleNotFound cause 502 deploying django with zappa on aws lambda

208 Views Asked by At

[RESOLVED]

I've faced ModuleNotFound error when try to deploy django to aws via zappa.

when i tried to run server locally using below commmand it works well

(venv) python manage.py runserver

or

(venv) python manage.py runserver --settings=remoteMedi.settings.prod

zappa settings is like

enter image description here

result zappa tail is like

enter image description here

folder hierachy is like

enter image description here

installed_app is like

enter image description here

why i can't get it?

1

There are 1 best solutions below

0
On BEST ANSWER

[RESOLVED]

The reason is folder hiearchy.

you have to place zappa_settings.json with manage.py on the same directory.

it's like

remoteMedi
ㄴ manage.py
   zappa_settings.json
   authenticate
   remoteMedi
   healthcheck