This project builds and deploys an AWS Lambda layer that supports GDAL 3.0.4 for Python 3.8.1.
aws cloudformation deploy --stack-name gdal-layer --template-file cloudformation.yaml --capabilities CAPABILITY_NAMED_IAM
aws codebuild start-build --project-name gdal-layer
- Create a new lambda function with the python 3.8 runtime
- Attach the layer to your function
- Set environment variable
GDAL_DATA=/opt/lib/data
- Add
from osgeo import gdal
to your function code - Enjoy!