Issue using M2Crypto on lambda (works on EC2)









up vote
0
down vote

favorite












I am trying to install a python function using M2Crypto in AWS Lambda.



I spun up an EC2 instance with the Lambda AMI image, installed M2Crypto into a virtualenv, and was able to get my function working on EC2.



Then I zipped up the site-package and uploaded to Lambda. I got this error




Unable to import module 'epd_M2Crypto':
/var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol
sk_deep_copy, version libcrypto.so.10 not defined in file
libcrypto.so.10 with link time reference




There are similar questions and hints here and here. I tried uploading the offending lib (libcrypto.so.10) in the zip file, but still get the same error. I am assuming the error means that the EC2 version of libcrypto.so.10 (used to install M2Crypto) is different than the version on Lambda (that I trying to run with), so M2Crypto complains.



If I look at the versions of openssl they are different:



  • OpenSSL 1.0.0-fips 29 Mar 2010 (lambda version)

  • OpenSSL 1.0.2k-fips 26 Jan 2017 (ec2 version)

I don't think the answer is to downgrade openssl on ec2 as the 1.0.0 version is obsolete (AWS applies security patches but the version still shows as 1.0.0). (Also the yum doesn't have versions this old)



Here's the steps i used on the EC2 instance to get it working on EC2:



$ sudo yum -y update
$ sudo yum -y install python36
$ sudo yum -y install python-virtualenv
$ sudo yum -y groupinstall "Development Tools"
$ sudo yum -y install python36-devel.x86_64
$ sudo yum -y install openssl-devel.x86_64

$ mkdir ~/forlambda
$ cd ~/forlambda
$ virtualenv -p python3 venv
$ source venv/bin/activate

$ cd ~
$ pip install M2Crypto -t ~/forlambda/venv/lib/python3.6/site-packages/

$ cd ~/forlambda/venv/lib/python3.6/site-packages/
$ (create python function that uses M2Crypto)
$ zip -r9 ~/forlambda/archive.zip .


Then added to the zip file



  • /usr/bin/openssl

  • /usr/lib64/libcrypto.so.10

  • /usr/lib64/libssl.so.10

And uploaded to Lambda, which is where I am now stuck.



Do I need to do something to get Lambda to use the version of libcrypto.so.10 that I have included in the uploaded zip?



My function:



"""
Wrapper for M2Crypto
https://github.com/mcepl/M2Crypto
https://pypi.org/project/M2Crypto/
"""

from __future__ import print_function
from M2Crypto import RSA
import base64
import json

def decrypt_string(string_b64):
rsa = RSA.load_key('private_key.pem')
string_encrypted = base64.b64decode(string_b64)
bytes = rsa.private_decrypt(string_encrypted, 1)
string_plaintext = bytes.decode("utf-8")

response =
's': string_plaintext,
'status': "OK",
'statuscode': 200
;
return response


def lambda_handler(event, context):

response = ""
action = event['action']

if action == "decrypt":
string_b64 = event['s']
response = decrypt_string(string_b64)

return response









share|improve this question



























    up vote
    0
    down vote

    favorite












    I am trying to install a python function using M2Crypto in AWS Lambda.



    I spun up an EC2 instance with the Lambda AMI image, installed M2Crypto into a virtualenv, and was able to get my function working on EC2.



    Then I zipped up the site-package and uploaded to Lambda. I got this error




    Unable to import module 'epd_M2Crypto':
    /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol
    sk_deep_copy, version libcrypto.so.10 not defined in file
    libcrypto.so.10 with link time reference




    There are similar questions and hints here and here. I tried uploading the offending lib (libcrypto.so.10) in the zip file, but still get the same error. I am assuming the error means that the EC2 version of libcrypto.so.10 (used to install M2Crypto) is different than the version on Lambda (that I trying to run with), so M2Crypto complains.



    If I look at the versions of openssl they are different:



    • OpenSSL 1.0.0-fips 29 Mar 2010 (lambda version)

    • OpenSSL 1.0.2k-fips 26 Jan 2017 (ec2 version)

    I don't think the answer is to downgrade openssl on ec2 as the 1.0.0 version is obsolete (AWS applies security patches but the version still shows as 1.0.0). (Also the yum doesn't have versions this old)



    Here's the steps i used on the EC2 instance to get it working on EC2:



    $ sudo yum -y update
    $ sudo yum -y install python36
    $ sudo yum -y install python-virtualenv
    $ sudo yum -y groupinstall "Development Tools"
    $ sudo yum -y install python36-devel.x86_64
    $ sudo yum -y install openssl-devel.x86_64

    $ mkdir ~/forlambda
    $ cd ~/forlambda
    $ virtualenv -p python3 venv
    $ source venv/bin/activate

    $ cd ~
    $ pip install M2Crypto -t ~/forlambda/venv/lib/python3.6/site-packages/

    $ cd ~/forlambda/venv/lib/python3.6/site-packages/
    $ (create python function that uses M2Crypto)
    $ zip -r9 ~/forlambda/archive.zip .


    Then added to the zip file



    • /usr/bin/openssl

    • /usr/lib64/libcrypto.so.10

    • /usr/lib64/libssl.so.10

    And uploaded to Lambda, which is where I am now stuck.



    Do I need to do something to get Lambda to use the version of libcrypto.so.10 that I have included in the uploaded zip?



    My function:



    """
    Wrapper for M2Crypto
    https://github.com/mcepl/M2Crypto
    https://pypi.org/project/M2Crypto/
    """

    from __future__ import print_function
    from M2Crypto import RSA
    import base64
    import json

    def decrypt_string(string_b64):
    rsa = RSA.load_key('private_key.pem')
    string_encrypted = base64.b64decode(string_b64)
    bytes = rsa.private_decrypt(string_encrypted, 1)
    string_plaintext = bytes.decode("utf-8")

    response =
    's': string_plaintext,
    'status': "OK",
    'statuscode': 200
    ;
    return response


    def lambda_handler(event, context):

    response = ""
    action = event['action']

    if action == "decrypt":
    string_b64 = event['s']
    response = decrypt_string(string_b64)

    return response









    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to install a python function using M2Crypto in AWS Lambda.



      I spun up an EC2 instance with the Lambda AMI image, installed M2Crypto into a virtualenv, and was able to get my function working on EC2.



      Then I zipped up the site-package and uploaded to Lambda. I got this error




      Unable to import module 'epd_M2Crypto':
      /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol
      sk_deep_copy, version libcrypto.so.10 not defined in file
      libcrypto.so.10 with link time reference




      There are similar questions and hints here and here. I tried uploading the offending lib (libcrypto.so.10) in the zip file, but still get the same error. I am assuming the error means that the EC2 version of libcrypto.so.10 (used to install M2Crypto) is different than the version on Lambda (that I trying to run with), so M2Crypto complains.



      If I look at the versions of openssl they are different:



      • OpenSSL 1.0.0-fips 29 Mar 2010 (lambda version)

      • OpenSSL 1.0.2k-fips 26 Jan 2017 (ec2 version)

      I don't think the answer is to downgrade openssl on ec2 as the 1.0.0 version is obsolete (AWS applies security patches but the version still shows as 1.0.0). (Also the yum doesn't have versions this old)



      Here's the steps i used on the EC2 instance to get it working on EC2:



      $ sudo yum -y update
      $ sudo yum -y install python36
      $ sudo yum -y install python-virtualenv
      $ sudo yum -y groupinstall "Development Tools"
      $ sudo yum -y install python36-devel.x86_64
      $ sudo yum -y install openssl-devel.x86_64

      $ mkdir ~/forlambda
      $ cd ~/forlambda
      $ virtualenv -p python3 venv
      $ source venv/bin/activate

      $ cd ~
      $ pip install M2Crypto -t ~/forlambda/venv/lib/python3.6/site-packages/

      $ cd ~/forlambda/venv/lib/python3.6/site-packages/
      $ (create python function that uses M2Crypto)
      $ zip -r9 ~/forlambda/archive.zip .


      Then added to the zip file



      • /usr/bin/openssl

      • /usr/lib64/libcrypto.so.10

      • /usr/lib64/libssl.so.10

      And uploaded to Lambda, which is where I am now stuck.



      Do I need to do something to get Lambda to use the version of libcrypto.so.10 that I have included in the uploaded zip?



      My function:



      """
      Wrapper for M2Crypto
      https://github.com/mcepl/M2Crypto
      https://pypi.org/project/M2Crypto/
      """

      from __future__ import print_function
      from M2Crypto import RSA
      import base64
      import json

      def decrypt_string(string_b64):
      rsa = RSA.load_key('private_key.pem')
      string_encrypted = base64.b64decode(string_b64)
      bytes = rsa.private_decrypt(string_encrypted, 1)
      string_plaintext = bytes.decode("utf-8")

      response =
      's': string_plaintext,
      'status': "OK",
      'statuscode': 200
      ;
      return response


      def lambda_handler(event, context):

      response = ""
      action = event['action']

      if action == "decrypt":
      string_b64 = event['s']
      response = decrypt_string(string_b64)

      return response









      share|improve this question















      I am trying to install a python function using M2Crypto in AWS Lambda.



      I spun up an EC2 instance with the Lambda AMI image, installed M2Crypto into a virtualenv, and was able to get my function working on EC2.



      Then I zipped up the site-package and uploaded to Lambda. I got this error




      Unable to import module 'epd_M2Crypto':
      /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol
      sk_deep_copy, version libcrypto.so.10 not defined in file
      libcrypto.so.10 with link time reference




      There are similar questions and hints here and here. I tried uploading the offending lib (libcrypto.so.10) in the zip file, but still get the same error. I am assuming the error means that the EC2 version of libcrypto.so.10 (used to install M2Crypto) is different than the version on Lambda (that I trying to run with), so M2Crypto complains.



      If I look at the versions of openssl they are different:



      • OpenSSL 1.0.0-fips 29 Mar 2010 (lambda version)

      • OpenSSL 1.0.2k-fips 26 Jan 2017 (ec2 version)

      I don't think the answer is to downgrade openssl on ec2 as the 1.0.0 version is obsolete (AWS applies security patches but the version still shows as 1.0.0). (Also the yum doesn't have versions this old)



      Here's the steps i used on the EC2 instance to get it working on EC2:



      $ sudo yum -y update
      $ sudo yum -y install python36
      $ sudo yum -y install python-virtualenv
      $ sudo yum -y groupinstall "Development Tools"
      $ sudo yum -y install python36-devel.x86_64
      $ sudo yum -y install openssl-devel.x86_64

      $ mkdir ~/forlambda
      $ cd ~/forlambda
      $ virtualenv -p python3 venv
      $ source venv/bin/activate

      $ cd ~
      $ pip install M2Crypto -t ~/forlambda/venv/lib/python3.6/site-packages/

      $ cd ~/forlambda/venv/lib/python3.6/site-packages/
      $ (create python function that uses M2Crypto)
      $ zip -r9 ~/forlambda/archive.zip .


      Then added to the zip file



      • /usr/bin/openssl

      • /usr/lib64/libcrypto.so.10

      • /usr/lib64/libssl.so.10

      And uploaded to Lambda, which is where I am now stuck.



      Do I need to do something to get Lambda to use the version of libcrypto.so.10 that I have included in the uploaded zip?



      My function:



      """
      Wrapper for M2Crypto
      https://github.com/mcepl/M2Crypto
      https://pypi.org/project/M2Crypto/
      """

      from __future__ import print_function
      from M2Crypto import RSA
      import base64
      import json

      def decrypt_string(string_b64):
      rsa = RSA.load_key('private_key.pem')
      string_encrypted = base64.b64decode(string_b64)
      bytes = rsa.private_decrypt(string_encrypted, 1)
      string_plaintext = bytes.decode("utf-8")

      response =
      's': string_plaintext,
      'status': "OK",
      'statuscode': 200
      ;
      return response


      def lambda_handler(event, context):

      response = ""
      action = event['action']

      if action == "decrypt":
      string_b64 = event['s']
      response = decrypt_string(string_b64)

      return response






      aws-lambda m2crypto






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 at 1:03

























      asked Nov 12 at 0:56









      Eric D'Souza

      531418




      531418






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          0
          down vote













          First I ran this command on the EC2 instance to make sure I had included the correct .so file in my .zip:



          $ ldd -v _m2crypto.cpython-36m-x86_64-linux-gnu.so 


          The output of the ldd command (edited for brevity):



           libssl.so.10 => /lib64/libssl.so.10 (0x00007fd5f1892000)
          libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fd5f1433000)


          Based on the output above, I included /lib64/libcrypto.so.10 in my .zip.



          Also (at the suggestion of AWS Support), on the Lambda console, under 'Environment variables', I added a key 'LD_LIBRARY_PATH' with value '/var/task'.



          I'm not sure if I needed both those changes to fix my problem, but it works right now and after three days of troubleshooting I am afraid to touch it to see if it was one or the other that made it work.






          share|improve this answer




















          • My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
            – Eric D'Souza
            Nov 16 at 23:47

















          up vote
          0
          down vote













          It is perhaps too brutal, but would it be possible to use LD_PRELOAD to force using your preferred version of OpenSSL library?






          share|improve this answer




















          • Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
            – Eric D'Souza
            Nov 19 at 22:20











          • I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
            – mcepl
            Nov 20 at 10:21










          • will do, thanks
            – Eric D'Souza
            Nov 20 at 16:49










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254776%2fissue-using-m2crypto-on-lambda-works-on-ec2%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          First I ran this command on the EC2 instance to make sure I had included the correct .so file in my .zip:



          $ ldd -v _m2crypto.cpython-36m-x86_64-linux-gnu.so 


          The output of the ldd command (edited for brevity):



           libssl.so.10 => /lib64/libssl.so.10 (0x00007fd5f1892000)
          libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fd5f1433000)


          Based on the output above, I included /lib64/libcrypto.so.10 in my .zip.



          Also (at the suggestion of AWS Support), on the Lambda console, under 'Environment variables', I added a key 'LD_LIBRARY_PATH' with value '/var/task'.



          I'm not sure if I needed both those changes to fix my problem, but it works right now and after three days of troubleshooting I am afraid to touch it to see if it was one or the other that made it work.






          share|improve this answer




















          • My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
            – Eric D'Souza
            Nov 16 at 23:47














          up vote
          0
          down vote













          First I ran this command on the EC2 instance to make sure I had included the correct .so file in my .zip:



          $ ldd -v _m2crypto.cpython-36m-x86_64-linux-gnu.so 


          The output of the ldd command (edited for brevity):



           libssl.so.10 => /lib64/libssl.so.10 (0x00007fd5f1892000)
          libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fd5f1433000)


          Based on the output above, I included /lib64/libcrypto.so.10 in my .zip.



          Also (at the suggestion of AWS Support), on the Lambda console, under 'Environment variables', I added a key 'LD_LIBRARY_PATH' with value '/var/task'.



          I'm not sure if I needed both those changes to fix my problem, but it works right now and after three days of troubleshooting I am afraid to touch it to see if it was one or the other that made it work.






          share|improve this answer




















          • My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
            – Eric D'Souza
            Nov 16 at 23:47












          up vote
          0
          down vote










          up vote
          0
          down vote









          First I ran this command on the EC2 instance to make sure I had included the correct .so file in my .zip:



          $ ldd -v _m2crypto.cpython-36m-x86_64-linux-gnu.so 


          The output of the ldd command (edited for brevity):



           libssl.so.10 => /lib64/libssl.so.10 (0x00007fd5f1892000)
          libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fd5f1433000)


          Based on the output above, I included /lib64/libcrypto.so.10 in my .zip.



          Also (at the suggestion of AWS Support), on the Lambda console, under 'Environment variables', I added a key 'LD_LIBRARY_PATH' with value '/var/task'.



          I'm not sure if I needed both those changes to fix my problem, but it works right now and after three days of troubleshooting I am afraid to touch it to see if it was one or the other that made it work.






          share|improve this answer












          First I ran this command on the EC2 instance to make sure I had included the correct .so file in my .zip:



          $ ldd -v _m2crypto.cpython-36m-x86_64-linux-gnu.so 


          The output of the ldd command (edited for brevity):



           libssl.so.10 => /lib64/libssl.so.10 (0x00007fd5f1892000)
          libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fd5f1433000)


          Based on the output above, I included /lib64/libcrypto.so.10 in my .zip.



          Also (at the suggestion of AWS Support), on the Lambda console, under 'Environment variables', I added a key 'LD_LIBRARY_PATH' with value '/var/task'.



          I'm not sure if I needed both those changes to fix my problem, but it works right now and after three days of troubleshooting I am afraid to touch it to see if it was one or the other that made it work.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 13 at 23:46









          Eric D'Souza

          531418




          531418











          • My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
            – Eric D'Souza
            Nov 16 at 23:47
















          • My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
            – Eric D'Souza
            Nov 16 at 23:47















          My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
          – Eric D'Souza
          Nov 16 at 23:47




          My function worked for a few hours, and then the next day stopped working (no changes). I have opened another ticket with AWS support. My guess is that the issue is related to the underlying OS instance that is picked up -- and it works on some and not others.
          – Eric D'Souza
          Nov 16 at 23:47












          up vote
          0
          down vote













          It is perhaps too brutal, but would it be possible to use LD_PRELOAD to force using your preferred version of OpenSSL library?






          share|improve this answer




















          • Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
            – Eric D'Souza
            Nov 19 at 22:20











          • I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
            – mcepl
            Nov 20 at 10:21










          • will do, thanks
            – Eric D'Souza
            Nov 20 at 16:49














          up vote
          0
          down vote













          It is perhaps too brutal, but would it be possible to use LD_PRELOAD to force using your preferred version of OpenSSL library?






          share|improve this answer




















          • Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
            – Eric D'Souza
            Nov 19 at 22:20











          • I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
            – mcepl
            Nov 20 at 10:21










          • will do, thanks
            – Eric D'Souza
            Nov 20 at 16:49












          up vote
          0
          down vote










          up vote
          0
          down vote









          It is perhaps too brutal, but would it be possible to use LD_PRELOAD to force using your preferred version of OpenSSL library?






          share|improve this answer












          It is perhaps too brutal, but would it be possible to use LD_PRELOAD to force using your preferred version of OpenSSL library?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 18 at 20:56









          mcepl

          2,0301530




          2,0301530











          • Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
            – Eric D'Souza
            Nov 19 at 22:20











          • I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
            – mcepl
            Nov 20 at 10:21










          • will do, thanks
            – Eric D'Souza
            Nov 20 at 16:49
















          • Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
            – Eric D'Souza
            Nov 19 at 22:20











          • I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
            – mcepl
            Nov 20 at 10:21










          • will do, thanks
            – Eric D'Souza
            Nov 20 at 16:49















          Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
          – Eric D'Souza
          Nov 19 at 22:20





          Thanks for the suggestion! I tried it out but still no luck :( In the Lambda console, under key I added LD_PRELOAD with value '/var/task/libcrypto.so.10' (without the quotes). I also tried value '/var/task/openssl:/var/task/libcrypto.so.10:/var/task/libssl.so.10'. I would have expected this to work, so now I'm wondering if I'm misunderstanding the error message from Lambda 'Unable to import module 'wz_M2Crypto': /var/task/M2Crypto/_m2crypto.cpython-36m-x86_64-linux-gnu.so: symbol sk_deep_copy, version libcrypto.so.10 not defined in file libcrypto.so.10 with link time reference'
          – Eric D'Souza
          Nov 19 at 22:20













          I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
          – mcepl
          Nov 20 at 10:21




          I really don't know, if you find a solution, please, let us know on gitlab.com/m2crypto/m2crypto/issues .
          – mcepl
          Nov 20 at 10:21












          will do, thanks
          – Eric D'Souza
          Nov 20 at 16:49




          will do, thanks
          – Eric D'Souza
          Nov 20 at 16:49

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53254776%2fissue-using-m2crypto-on-lambda-works-on-ec2%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

          Museum of Modern and Contemporary Art of Trento and Rovereto