aws_lambda_ftp_function
aws_lambda_ftp_function copied to clipboard
Files from multiple folders
Thank you for the Lambda script. I am using the script to connect a FTP server and pull all the files into a S3 bucket, except all the files I need are in multiple folders so I keep getting errors downloading the files. the script tries to download the files and errors out because all the files I need are in folders in the remote path Is there a way to pull files from multiple folders?
you should be able to retrieve all folders if you add else
for if statement at
if not is_ftp_folder(ftp, file):
this will require rewriting the handler to be a function so it can be re-used in the else statement.
Hello Orasik, This is really good stuff! I am looking for the exact same things as cgriffith12. I apologize but I am new to python and can't seem to get this to work. Can you please show in detail how to add an else for if statement to your existing script? I also don't know what you mean by 'rewriting the handler to be a function'.
Any assistance would be greatly appreciated. Thanks mate!