Open gdugernier opened 5 years ago
Are you using the dockerizePip
option? That is a requirement for deploying packages like numpy from mac os & windows.
Yeah what I did was include the linux (because thats the OS my lambda sits on) precompiled binaries in the in their respective folders at the same level as my lambda: https://medium.com/@korniichuk/lambda-with-pandas-fd81aa2ff25e
works too, but the dockerizePip is the idea, or layers with that.
Hello,
First I would like to apologize for the lack of technical info to help solve this issue, but I'm not very proficient in anything python related. I'll do the best I can, though I think anything within my work is unrelated to the issue.
What went wrong?
I'm deploying a Lambda function in python which uses Pandas (and thus Numpy) and Sqlalchemy with Serverless through CodeBuild. The CodeBuild server is Linux and everything is working perfectly.
I now take the same project and deploy it directly from my Windows machine. The deployment is done without error but when I try to use the Lambda function I get the following error:
It is important to note the two projects are identical aside from name changes. The only difference is the OS on which the deployment is done.
I also noted a different in the function size at the end. The function deployed on Linux is 22.2 MB and the one deployed on Windows is 21 MB. There doesn't seem to be missing files inside either zip, but Pandas and Numpy are the ones of different sizes between the two versions (though the content structure is the same). I'm guessing it's due to the Windows/Linux version of the dependencies being not entirely the same?
Additional information:
Severless: 1.35 Serverless-python-requirements: Latest Python: 2.7