https://github.com/qedsoftware/gis-libs-lambda-build
Build tools for leveraging the LibGeos package with Python in a Lambda execution environment
https://github.com/qedsoftware/gis-libs-lambda-build
Last synced: 4 months ago
JSON representation
Build tools for leveraging the LibGeos package with Python in a Lambda execution environment
- Host: GitHub
- URL: https://github.com/qedsoftware/gis-libs-lambda-build
- Owner: qedsoftware
- License: apache-2.0
- Created: 2019-07-04T18:05:00.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-04T18:06:15.000Z (almost 7 years ago)
- Last Synced: 2025-09-05T01:48:02.308Z (9 months ago)
- Language: Dockerfile
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build GEOS Dependencies for AWS Lambda
If you're leveraging any of the Python tool sets that depend on the Open Source geometry toolkit [GEOS](https://trac.osgeo.org/geos/),
such as Shapely, you may have some difficulties executing code within an AWS Lambda function.
You can deploy the GEOS dependencies as a layer within Lambda, allowing your Python code to execute with the
correct C++ library code built for you.
This package creates a build environment based on the specific Amazon Linux version Lambda executes in. The
Entrypoint script will export the build libraries to a zip file. All you need to do is upload as a layer to Lambda.
## Build Steps
1. Build the Docker container and libgeos
- `$docker build -t libgeos-lambda-build:latest .`
2. Run the container and mount an output directory
- ``$docker run -v `pwd`:/output libgeos-lambda-build:latest``
- You should now have `libgeos-amzn-linux.zip`
3. Deploy the library as a layer to Lambda
- You can now run Python code such as Shapely inside an AWS Lambda function!