I am trying to import goose3 in AWS lambda, using Layers.
My workflow is the same, as with other packages, i.e. install the library in a "python" folder with pip3 install goose3 -t .
Then, I compress the folder and import in AWS layers. When I try to import the library in Lambda function, I get the following error:
{ "errorMessage": "Unable to import module 'lambda_function': cannot import name 'etree' from 'lxml' (/opt/python/lxml/init.py)", "errorType": "Runtime.ImportModuleError", "requestId": "731adafc-ab34-4708-87e1-9a967b7356cc", "stackTrace": [] }
Is there any way I could resolve this?