I have a python code that runs normally on my local computer but when I try to run in AWS Lambda, a timeout happens when trying to list the files in the directory even though it connects to the directory properly.
ftp = FTP(host,user,password)
ftp.set_pasv(False)
print( ftp.cwd(path) )
print( ftp.retrlines("LIST") )
I already tried active and passive mode but both of them don't work. The timeout is already at the max allowed which is 5 minutes.