I am trying to deploy my Geo-Django app to Zappa 1st I got
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library
(tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0",
"gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting
GDAL_LIBRARY_PATH in your settings.
Then I followed this link and added the below
I set these environment variables in my AWS Lambda console:
"LD_LIBRARY_PATH": "/tmp/code/lib/",
"PROJ_LIB": "/tmp/code/lib/proj4/",
and in my (Django) app's settings file, I set:
GDAL_LIBRARY_PATH = "/tmp/code/lib/libgdal.so.20.1.3"
GEOS_LIBRARY_PATH = "/tmp/code/lib/libgeos_c.so.1"
Now I am getting the error
OSError: /tmp/code/lib/libgdal.so.20.1.3: cannot open shared object file: No such file or directory
How can I fix this ?
Summary of what I have done
$ pip install zappa
$ zappa init
$ zappa deploy prod
Below is my zappa_settings.json
{
"prod": {
"aws_region": "us-east-1",
"django_settings": "Cool.settings",
"profile_name": "default",
"project_name": "cool",
"runtime": "python3.6",
"s3_bucket": "coolplaces-t47c5adgt",
"extra_permissions": [{
"Effect": "Allow",
"Action": ["rekognition:*"],
"Resource": "*"
}]
}
}