3

I am using the Python module xmlsec in my lambda function. The import looks like import dm.xmlsec.binding as xmlsec. The proper directory structure exists. at the root of the archive there is dm/xmlsec/binding/__init__.py and the rest of the module is there. However, when executing the function on lambda, I get the error "No module named dm.xmlsec.binding"

I have built many Python27 lambda functions in the same way as this one with no issues. I install all of the needed python modules to my build directory, with the lambda function at the root. I then zip the package recursively and update the existing function with the resulting archive using the AWS CLI. I've also tried manually uploading the archive in the console as well, with the same result.

I was honestly expecting some trouble with this module, but I did expect lambda to at least see it. What is going on?

Marty
  • 2,104
  • 2
  • 23
  • 42
  • 2
    Import dependent on native libraries? Potential advice here: http://stackoverflow.com/questions/34749806/using-moviepy-scipy-and-numpy-in-amazon-lambda – jarmod Feb 11 '17 at 23:48
  • Yeah, almost certainly. I was planning to deal with that once I got the corresponding errors. That q/a implies that this is the expected behavior if the native libraries aren't present? – Marty Feb 12 '17 at 00:34
  • Any update on this as of 2022 ? – damuz91 Mar 04 '22 at 11:58

0 Answers0