0

I have a standalone java code with a main() method and this code has logic to SFTP a file from my local machine to another remote machine using JSch API. This code is working fine when I run it as a standalone program in my machine and I see the file is SFTPed to remote machine.

But I then moved the same above code to AWS Lambda Handler written in Java and when I test the AWS Lambda function from AWS Console, I am getting below exception. It looks like the JSch code is not able to create a socket when I run the code from Lambda Function.

Can’t it get the IP Address & Port# (Socket) where the AWS Lambda Function is executing?

Below is the code I am using to SFTP a file. Please help me to understand why the socket is not able to be created when I run the code from Lambda Function?

Exception: timeout: socket is not established: com.jcraft.jsch.JSchException com.jcraft.jsch.JSchException: timeout: socket is not established

Srikanth
  • 53
  • 1
  • 5

0 Answers0