Lambda function to transfer from AWS S3 to external SFTP

Hello,
I am relatively new to Lambda and I am trying to create a function that when a new file is uploaded to an S3 bucket it will trigger the Lambda function and push the new file to an external SFTP server. I set up the blueprint “Get-S3” function which ran when I uploaded a file to my bucket but I’m having an issue with the coding to push to the SFTP. Can anyone lend some assistance?

Thank you
Brian

the lamba function receives an event and context object as parameters. it specify the S3 bucket name and file key for the file you want to transfer. next it provide the detail of external SFTP server, including the hostname, username, password and port.