I am trying to use Cerberus in AWS lambda but running into the below error when trying to execute the code. I created a custom layer and pointed it to zip file in S3 downloaded from here. Runtime env for lambda and layer is python3.11
. Any ideas on how to fix this and use Cerberus in lambda?
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'cerberus'
from cerberus import Validator
...
v = Validator(schema)
...
Zip file structure:
I fixed this by installing the library to a target folder and zipping the contents.