2

I built an website in Django & went to go upload it to aws using zappa following this tutorial.

 

I am running a virtual environment using python3.8.1.

 

When I deploy using Zappa I get this error: Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 502 response code.

Checking the logs using zappa tail I get this: ImproperlyConfigured: SQLite 3.8.3 or later is required (found 3.7.17).

 

When I check the sqlite3 version I get this:

(env)$ python
Python 3.8.1 (default, Dec 27 2019, 18:06:00)
>>> import sqlite3
>>> sqlite3.sqlite_version`
'3.31.1'

When I check for just sqlite (just to be sure) I get this:

>>> import sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'sqlite'

When I check the Django version I get this:

>>> django.VERSION
(3, 0, 4, 'final', 0)

I tried to use these resources to solve it but couldn't get anywhere (I think because I am new & confused):

How to upgrade sqlite 3.8.2 to >= 3.8.3

How to upgrade sqlite3 version in Python from 3.7.17 to > 3.8

Using SQLite3 with Django 2.2 and Python 3.6.7 on Centos7

 

I also came across this but it didn't really provide much of a solution unless downgrading is the only/correct solution:

https://www.reddit.com/r/djangolearning/comments/d3p8nb/sqlite_383_or_later_is_required_found_382/

Also I am using a Mac if that matters. It seems a lot of people with this error are using Ubuntu 14.04.

 

I came across this & also didn't get anywhere. I followed this link in that post & when I check the sqlite3 --version I got back:

3.28.0 2019-04-15 14:49:49 378230ae7f4b721c8b8d83c8ceb891449685cd23b1702a57841f1be40b5daapl

So it seems sqlite3 on my Mac is up to date but is not working in Django for some reason?

Thank you for any help.

eplaut
  • 666
  • 1
  • 7
  • 26
Brenton Beltrami
  • 333
  • 6
  • 11
  • a couple of comments, the tutorial you followed connects an AWS rds aurora serverless MySQL database to Django, so why are you attempting to utilize the builtin SQLite? Also, I have received the same Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 502 response code but this was due to Django being greater than version 2.1, I'm pretty sure you're trying to deploy with Django 3.x just isn't going to work. The tutorial by the way works start to finish. – Chuck LaPress Apr 18 '20 at 18:10
  • Did a little more research into your specific requirements read through https://github.com/flipperpa/django-s3-sqlite specific as it addresses the version of SQLite you are approaching this with. – Chuck LaPress Apr 19 '20 at 17:38

1 Answers1

2

For AWS(Amazon Linux 2 AMI (HVM), SSD Volume Type)

download fedoraproject package

wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.8.11/1.fc21/x86_64/sqlite-3.8.11-1.fc21.x86_64.rpm

run below command to run sqlite 3.8

sudo yum install sqlite-3.8.11-1.fc21.x86_64.rpm

Vijay
  • 141
  • 7