Shapely setup for AWS Lambda Python features

I have tried to configure Shapely on AWS Lambda, but always got the error below.

module initialization error: Could not find lib geos_c or load any of its variants ['libgeos_c.so.1', 'libgeos_c.so', '/usr/lib/libgeos_c.so'].

Not sure how to build shapelyin this case. Built my package on an instance Linuxand used it for deployment.

+1
source share
2 answers

If you want to create your own Lambda-compatible binaries for use in your deployment packages, AWS says AMI needs to be created here:

https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html

EC2 AMI, pip , , -t. tar'd , .

: https://github.com/ryfeus/lambda-packs . ( shapley, -1.6b4.dist-info .

, Python 2.7 , AMI Python 2.7.

+3
+1

Source: https://habr.com/ru/post/1663809/


All Articles