Hi,
I have a problem of running my code on Lambda. I followed the steps in this tutorial (
https://aws.amazon.com/blogs/compute/scheduling-ssh-jobs-using-aws-lambda/)
I have installed pycrypto successfully.
The code is like that:
```
import boto3
import paramiko
def worker_handler(event, context):
s3_client = boto3.client('s3')
#Download private key file from secure S3 bucket
s3_client.download_file('s3-bucket-with-key','keys/devenv-key.pem', '/tmp/devenv-key.pem')
k = paramiko.RSAKey.from_private_key_file("/tmp/devenv-key.pem")
...
```
And this is the error message:
```
/var/task/cryptography/hazmat/bindings/_constant_time.so: invalid ELF header: ImportError Traceback (most recent call last): File "/var/task/worker_function.py", line 9, in worker_handler
k = paramiko.RSAKey.from_private_key_file("/tmp/devenv-key.pem")
File "/var/task/paramiko/pkey.py", line 196, in from_private_key_file key = cls(filename=filename, password=password)
File "/var/task/paramiko/rsakey.py", line 45, in __init__
self._from_private_key_file(filename, password)
File "/var/task/paramiko/rsakey.py", line 164, in _from_private_key_file
self._decode_key(data)
File "/var/task/paramiko/rsakey.py", line 173, in _decode_key
data, password=None, backend=default_backend()
File "/var/task/cryptography/hazmat/backends/__init__.py", line 35, in default_backend _default_backend = MultiBackend(_available_backends())
File "/var/task/cryptography/hazmat/backends/__init__.py", line 22, in _available_backends "cryptography.backends"
File "/var/task/pkg_resources/__init__.py", line 2235, in resolve module = __import__(self.module_name, fromlist=, level=0)
File "/var/task/cryptography/hazmat/backends/commoncrypto/__init__.py", line 7, in <module>
from cryptography.hazmat.backends.commoncrypto.backend import backend
File "/var/task/cryptography/hazmat/backends/commoncrypto/backend.py", line 11, in <module> from cryptography.hazmat.backends.commoncrypto.ciphers import ( File "/var/task/cryptography/hazmat/backends/commoncrypto/ciphers.py", line 11, in <module>
from cryptography.hazmat.primitives import ciphers, constant_time
File "/var/task/cryptography/hazmat/primitives/constant_time.py", line 9, in <module> from cryptography.hazmat.bindings._constant_time import lib
ImportError: /var/task/cryptography/hazmat/bindings/_constant_time.so: invalid ELF header
```
Thanks in advanced, hope someone can help me.