on a AWS Glue Job, I'm using ftplib to download files and store them to S3, with the following code:
from ftplib import FTP
ftp = FTP()
ftp.connect("ftp.ser.ver", 21)
ftp.login("user", "password")
remotefile='filename.txt'
download='s3://bucket/folder/filename.txt'
with open(download,'wb') as file:
ftp.retrbinary('RETR %s' % remotefile, file.write)
And I got an error stated as follow:
FileNotFoundError: [Errno 2] No such file or directory
Ran the same code through local and changed the download path to local path and the code works. I'm fairly new to S3 and Glue and not sure where to look for right documentations. Any insight and suggestion is greatly appreciated.