Troubleshooting: Failing to connect to Hosted~FTP~ via AWS Lambda
The common problem is that the FTP code running inside the Lambda function is not successfully reaching the FTP server. Our recommended next steps include:
- Confirm that the Lambda function has external internet access
https://aws.amazon.com/premiumsupport/knowledge-center/internet-access-lambda-function/
- Confirm that the FTP library is configured to connect in Passive mode (as opposed to Active mode). Active mode requires the FTP library to receive inbound connections from the FTP server and Lambda does not allow these inbound connections.
- Try using a different library in the Lambda code, possibly an SFTP library that connects to the FTP server on port 22