Skip to content
This repository was archived by the owner on May 9, 2020. It is now read-only.

PyChef doesn't work on Amazon linux #41

Closed
gswallow opened this issue Oct 14, 2015 · 5 comments
Closed

PyChef doesn't work on Amazon linux #41

gswallow opened this issue Oct 14, 2015 · 5 comments

Comments

@gswallow
Copy link

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:

   __|  __|_  )
   _|  (     /   Amazon Linux AMI
  ___|\___|___|

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.

@freimer
Copy link

freimer commented Apr 8, 2016

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.

@troyready
Copy link

Could also be solved via #49 , just to link them

@freimer
Copy link

freimer commented Apr 8, 2016

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.

@coderanger
Copy link
Owner

#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.

@coderanger
Copy link
Owner

0.3.0 is out with #43 as an interim fix. It's no worse than what was there before at least.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants