title: module initialization error: Cannot load native module 'Crypto.Cipher._raw_ecb' at AWS lambda
body: <p>I am making service using AWS lambda. I am using PyCryptodome for encryption and decryption. I am able to test my application locally, but when I upload to AWS lambda for decrypting. I get the error as</p>
  
  <blockquote>
    <p>module initialization error: Cannot load native module 'Crypto.Cipher._raw_ecb': Trying '_raw_ecb.cpython-36m-x86_64-linux-gnu.so': /var/task/Cryptodome/Util/../Cipher/_raw_ecb.cpython-36m-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory, Trying '_raw_ecb.abi3.so': /var/task/Cryptodome/Util/../Cipher/_raw_ecb.abi3.so: cannot open shared object file: No such file or directory, Trying '_raw_ecb.so': /var/task/Cryptodome/Util/../Cipher/_raw_ecb.so: invalid ELF header</p>
  </blockquote>
  
  <p>My code for decryption is </p>
  
  <pre><code>    def blowfish_decrypt(enc):
          secret_key = b"somestring"
          iv = b"somerandomiv"
          logger.info("in the decrypter")
          crypt_obj = bf_cbc.new(secret_key, bf_cbc.MODE_CBC, IV=iv)
          original = crypt_obj.decrypt(base64.b64decode(enc))
          original = original.decode("utf-8")
          logger.info("decrypted")
          return original
  </code></pre>
  
  <p>I was following the resource: <a href="https://github.com/pyinstaller/pyinstaller/issues/2125" rel="nofollow noreferrer">https://github.com/pyinstaller/pyinstaller/issues/2125</a>, but this didn't help me either.</p>
  
  <p>after applying all the details as specified I am getting the same above error.</p>