Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko
- def worker_handler(event, context):
- host = "sftpserver.testdpom.com"
- port = 22
- transport = paramiko.Transport((host, port))
- sftp = paramiko.SFTPClient.from_transport(transport)
- username = "xxxx"
- password = "xxxxxx"
- transport.connect(username = username, password = password)
- sftp = paramiko.SFTPClient.from_transport(transport)
- sftp.put("test.txt", "test.txt")
- sftp.close()
- transport.close()
- return
- {
- 'message' : "Script execution completed. See Cloudwatch logs for complete output"
- }
- File "/var/task/paramiko/kex_group1.py", line 111, in _parse_kexdh_reply
- self.transport._verify_key(host_key, sig)
- File "/var/task/paramiko/transport.py", line 1617, in _verify_key
- key = self._key_info[self.host_key_type](Message(host_key))
- File "/var/task/paramiko/rsakey.py", line 58, in __init__
- ).public_key(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=['__name__'], level=0)
- File "/var/task/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module>
- from cryptography.hazmat.backends.openssl.backend import backend
- File "/var/task/cryptography/hazmat/backends/openssl/backend.py", line 15, in <module>
- from cryptography import utils, x509
- File "/var/task/cryptography/x509/__init__.py", line 7, in <module>
- from cryptography.x509.base import (
- File "/var/task/cryptography/x509/base.py", line 15, in <module>
- from cryptography.x509.extensions import Extension, ExtensionType
- File "/var/task/cryptography/x509/extensions.py", line 19, in <module>
- from cryptography.hazmat.primitives import constant_time, serialization
- File "/var/task/cryptography/hazmat/primitives/constant_time.py", line 9, in <module>
- from cryptography.hazmat.bindings._constant_time import lib
- ImportError: No module named _constant_time
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement