giovanniborella / gdal-lambda-layer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

This project builds and deploys an AWS Lambda layer that supports GDAL 3.0.4 for Python 3.8.1.

Build the Layer

aws cloudformation deploy --stack-name gdal-layer --template-file cloudformation.yaml --capabilities CAPABILITY_NAMED_IAM

aws codebuild start-build --project-name gdal-layer

Use the Layer

  1. Create a new lambda function with the python 3.8 runtime
  2. Attach the layer to your function
  3. Set environment variable GDAL_DATA=/opt/lib/data
  4. Add from osgeo import gdal to your function code
  5. Enjoy!

Additional Resources

Geospatial Data Abstraction Library

GDAL on PyPI

AWS Lambda Layers

About

License:MIT License