I am trying to run Django application on AWS LightSail instance.
I have been able to deploy Django application so far but got stuck when I started configuring setting to use AWS S3.
I would like to use my static/media files on S3.
However, I keep getting the Ineternal Server Error 500 with error logs stating 'MouduleNotFoundError' storages.
This error is similar to the error stated in https://community.bitnami.com/t/how-do-i-install-python-packages-in-bitnami-django-stack-in-aws/88764
Here, I would like to paste some screen captures to get you understand the issue correctly.
1) When I do run pip list, the package 'django-storages' is correctly installed. To install django-storages, I have run the command pip install django-storages.
2) In my settings.py, I have stated the module 'storages' in INSTALLED_APPS
If I remove 'storages' from INSTALLED_APPS and restart apache, it works fine.
3) My server error log states ModuleNotFoundError (storages). This is very weird as the package has been installed successfully and correctly.
4) I assume all other settings like wsgi.py, httpd-app.conf etc for deploying Django application on AWS LightSail have been good. I confirmed the site was working fine several times.
It seems like the module installed cannot be loaded properly but It seems like it only applies to 'storages'. If I cannot load django-storages, I am concerned that I might not be able to utilise Amazon S3 to get my static/media files into it.
Could anyone point out what needs to be done to make sure that the modules are correctly loaded when it comes to deployment?
Lastly, this issue is similar to the previous issue raised on https://community.bitnami.com/t/how-do-i-install-python-packages-in-bitnami-django-stack-in-aws/88764/12. Yet, the issue does not seem to have been solved.
Thanks million times.