s3 to ftp server without downloading to ec2

我们两清 提交于 2019-12-23 05:13:34

问题


Is there is way (programmatically) to transfer file from s3 bucket to an external ftp server without downloading it to an ec2 instance ?

More details:

  1. I have a Django server running on EC2 which serves an angular web app.

  2. User uploads a file to S3 bucket using my web app and once the upload is complete the web app sends a POST request containing the file object s3 url.

  3. The Django server upon receiving the POST request may need to copy the file (uploaded to s3) to an external ftp server. The target ftp server may be different depending upon the user who uploaded the file (each user group may have her own ftp server).

  4. I understand that upon receiving POST request, Django server can download the file from s3 and then upload it to the appropriate target ftp server.

My question is: Can I reduce overhead on my EC2 instance in step 4 by somehow initiating a transfer from s3 to the target ftp server and get a callback/notification when that transfer completes (success or error).

Thanks.


回答1:


You can create a lambda function to do the same.

A complete reference of the implementation is discussed here.

https://pythonvibes.wordpress.com/2016/12/09/ftp-and-sftp-through-lambda/

Hope it helps.



来源:https://stackoverflow.com/questions/48308380/s3-to-ftp-server-without-downloading-to-ec2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!