[gdal-dev] Use GDAL on AWS Lambda

Jeremy Palmer palmerjnz at gmail.com
Thu Jul 12 13:33:04 PDT 2018


I have no direct experience, but there are plenty of resources on the web
for how to install GDAL on Lambda:

https://github.com/mmcfarland/foss4g-lambda-demo (presentation
https://vimeo.com/234947418)
https://github.com/joshtkehoe/lambda-python-gdal

Both are using python 2.7, but the steps should be translatable to 3.6 as
your biggest issue is likely to be the size of linked binaries which should
be similar under both versions.

Cheers
Jeremy

On Fri, Jul 13, 2018 at 7:31 AM kch <kchin at edrnet.com> wrote:

> 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
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180713/d650fedf/attachment.html>


More information about the gdal-dev mailing list