Lamda function that transfer files from an SFTP server onto an S3 bucket
APACHE-2.0 License
This AWS Lambda function fetches files from an SFTP server and copies them onto a given S3 Bucket.
+-------------------+ +--------------------+ +--------------------+
| | | | | |
| SFTP <-----------+ LAMBDA +----------> S3 BUCKET |
| +-----------> | | |
+-------------------+ +--------------------+ +--------------------+
docker build -t lambda-python-pysftp .
docker run -it --rm -v ~/:/output lambda-python-pysftp bash -c "cd /release; zip -r /output/sftp2S3.zip ."
CLEAN_SFTP_FILES
: OPTIONAL BOOLEAN Cleanup files on SFTP (defaults to: False)PROCESS_LATEST_ONLY
: OPTIONAL BOOLEAN Choose whether to process all files or the most recent one only (defaults to: False)S3_BUCKET
: MANDATORY STRING This is the name of the destination bucketSFTP_PORT
: MANDATORY INTEGER SFTP server TCP portSFTP_HOST
: MANDATORY STRING SFTP server hostnameSFTP_USERNAME
: MANDATORY STRING SFTP server usernameSFTP_PASSWORD
: MANDATORY STRING ENCRYPTED SFTP server passwordSFTP_KNOWNHOSTS_FILE
: MANDATORY STRING ENCRYPTED SFTP server signaturessh-keyscan 2>/dev/null