Seemingly unrelated 'rpds.rpds' error when importing Python library onto AWS Lambda

205 Views Asked by At

I've been trying to move some python code I've written into AWS Lambda. It's a CSV validator that uses the 'pycsvschema' library, and works perfectly on my local PC. I had to do some finicking with downloading the library onto a lambda layer, but it seems to work on that level. The problem is, now I'm getting this error in CloudWatch logs:

"Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'rpds.rpds'".

I have no idea why this error is here, and especially have no idea on how to fix it.

I vaguely understand that 'rpds' is used by the JSONSchema library, which in turn is used by the library I want to use. I've checked and both 'rpds' and 'JSONSchema' are within the zip file that the AWS layer takes libraries from. But I have no idea what it does, and where to start in fixing this error. Could anybody help?

0

There are 0 best solutions below