[gdal-dev] Use GDAL on AWS Lambda

kch kchin at edrnet.com
Thu Jul 12 12:30:56 PDT 2018


Hello, 

I am looking for any help from anyone who has experience with using GDAL on
AWS Lambda. I am trying to deploy a python function which uses GDAL onto AWS
Lambda. At the moment I am using Serverless to package and deploy my
function. I am at a roadblock because I can't figure out how to get all the
dependencies into my deployment package. My Serverless function packages the
dependencies listed in a requirements.txt using the
serverless-python-requirements plugin and dockerizePip: true option. At
deployment, I get the error: 

Serverless: Installing requirements of requirements.txt in .serverless…
Serverless: Docker Image: lambci/lambda:build-python3.6
Error --------------------------------------------------
The directory ‘/.cache/pip/http’ or its parent directory is not owned by the
current user and the cache has been disabled. Please check the permissions
and owner of that directory. If executing pip with sudo, you may want sudo’s
-H flag.
The directory ‘/.cache/pip’ or its parent directory is not owned by the
current user and caching wheels has been disabled. check the permissions and
owner of that directory. If executing pip with sudo, you may want sudo’s -H
flag.
Command “python setup.py egg_info” failed with error code 1 in
/tmp/pip-install-yo9exd91/pygdal/
For debugging logs, run again after setting the “SLS_DEBUG=*” environment
variable.

I have already updated setuptools to the latest version and even included
the latest version of setuptools in requirements.txt. I think the problem is
that at deployment, Serverless does not pick up all the non-python
dependencies of GDAL. I don't know how to work around this. 

I am running on Ubuntu 16.04 and Python3.6. Thank you in advance.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list