将文件从SFTP复制到Amazon S3 [英] Copy a file from SFTP to Amazon S3

查看:59
本文介绍了将文件从SFTP复制到Amazon S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将文件从SFTP复制到S3.我不想登陆文件中间服务器,请给我建议方法.

I am trying to copy a file from SFTP to S3. I don't want to land the file intermediate server please suggest me ways to do it.

推荐答案

我假设您无权访问/控制sftp服务器.如果您有访问权限,那就很容易.

I'm assuming you don't have access to/control of the sftp server. If you do have access, it's easy.

否则,请选择您要选择的语言并传输数据.例如,使用Python,您可以使用 paramiko sftp.getfo(),然后将该文件流指向Boto的 s3.key.send_file().这使您无需将文件下载到磁盘.

Otherwise, pick the language of your choice and stream the data. For instance, with Python you can use paramiko's sftp.getfo() and point that file stream at Boto's s3.key.send_file(). That keeps you from needing to download the file to disk.

但是,无法告诉随机的SFTP服务器将其发送到S3.

However, there's no way to tell a random SFTP server to send it to S3.

这篇关于将文件从SFTP复制到Amazon S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆