Closed gswallow closed 8 years ago
I used this to bundle the libcrypto in the zip file used to create the lambda function: https://markn.ca/2015/10/python-extension-modules-in-aws-lambda/ This is not a PyChef issue, but rather a Lambda issue, like you suggested.
Could also be solved via #49 , just to link them
Yea, I just saw that. I'm thinking of forking and merging everything in myself to do a new release. Would have saved me lots of time if this was already merged into the official release.
https://github.com/coderanger/pychef/pull/43 is another fix for it, or I could gut the whole thing and replace with Cryptography which is probably the safest option but will piss people off so I just haven't gone there yet. The right fix is probably to check for Cryptography and use it if present and otherwise fall back to rsa.py. But implementing that will be a pain so I haven't done it yet and no one else has offered.
0.3.0 is out with #43 as an interim fix. It's no worse than what was there before at least.
I'm sure this is some kind of operating system bug and totally not PyChef's fault, but I just tried to use PyChef in an AWS Lambda, and I ran into snags using libcrypto.so, because it doesn't exist:
https://aws.amazon.com/amazon-linux-ami/2015.09-release-notes/ No packages needed for security; 14 packages available Run "sudo yum update" to apply all updates. [ec2-user@ip-172-10-12-87 ~]$ ls /lib64/crypto /lib64/libcrypto.so.10 /lib64/libcrypto.so.1.0.1k /lib64/libk5crypto.so.3 /lib64/libk5crypto.so.3.1
I "fixed" it, for my own use, by changing line 9 of rsa.py to use libcrypto.so.10, instead.