Search code examples
python-3.xdjangoamazon-web-servicesaws-lambdazappa

ModuleNotFound cause 502 deploying django with zappa on aws lambda


[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?


Solution

  • [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