[英]How to transfer a file/files from one S3 bucket/directory to another using AWS Data Pipeline
I would like to transfer a file (ie copy it to a target directory and delete it from the source directory) from one S3 bucket directory to another using AWS data pipeline. 我想使用AWS数据管道将文件从一个S3存储桶目录传输到另一个文件(即,将其复制到目标目录并从源目录中删除)。
I tried using the ShellCommandActivity and made a script that would move a file/files from one S3 bucket/directory to another. 我尝试使用ShellCommandActivity并制作了一个脚本,该脚本可以将文件从一个S3存储桶/目录移动到另一个。 But the result was that it only copied it to the target S3 bucket/directory and did not remove the file in the S3 source directory.
但是结果是它仅将其复制到目标S3存储桶/目录,而没有删除S3源目录中的文件。
Thanks in advance! 提前致谢!
If you want to remove something from an S3 bucket you must explicitly delete it; 如果要从S3存储桶中删除某些内容,则必须明确删除它; there is no native concept of "move" other than copy and delete.
除了复制和删除外,没有“移动”的本机概念。
That said, last time I tried I found I could not delete from an S3 bucket resource in the data pipeline. 就是说,上次尝试时发现无法从数据管道中的S3存储桶资源中删除。 I had to get around this by using s3cmd instead.
我不得不通过使用s3cmd来解决此问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.