How to transfer a file/files from one S3 bucket/directory to another using AWS Data Pipeline

爱⌒轻易说出口 提交于 2019-12-13 18:07:48

问题


I would like to transfer a file (i.e copy it to a target directory and delete it from the source directory) from one S3 bucket directory to another using AWS data pipeline.

I tried using the ShellCommandActivity and made a script that would move a file/files from one S3 bucket/directory to another. 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.

Thanks in advance!


回答1:


If you want to remove something from an S3 bucket you must explicitly delete it; 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. I had to get around this by using s3cmd instead.



来源:https://stackoverflow.com/questions/20760233/how-to-transfer-a-file-files-from-one-s3-bucket-directory-to-another-using-aws-d

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