1

I am trying to import paramiko library to AWS Lambda. I have tried to do so on lambda using Python version 2.7, 3.6, 3.8. I upload the zip file (created on ec2 machine using cmd, containing all dependencies) by creating a layer on Lambda function, however it keeps giving me the error-No module named Paramiko. Could you please suggest me how to successfully import paramiko to establish an sftp connection.

1 Answer 1

1

I have imported paramiko to Lambda Python 3.8 runtime as a layer. The point is you have to pip install it and pack it into a zip file in amznlinux2 x86 EC2 instance with Python3.8 installed. And make sure all content in the zip file is in a folder named python.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.