I am trying to deploy a python lambda function with a zip file archive.
Using AWS CodeBuild I followed the instructions to setup a zip file with my source code and dependencies at the top level.
However, when I invoke my Lambda function an import error is reported:
{
"errorMessage": "Unable to import module 'my_module': No module named 'cytoolz.itertoolz'",
"errorType": "Runtime.ImportModuleError",
"requestId": "<random uuid>",
"stackTrace": []
}
Why is Lambda unable to find a dependency that exists within a zip file that is built using CodeBuild?