简体   繁体   English

如何使用AWS Data Pipeline将文件从一个S3存储桶/目录传输到另一个

[英]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.

相关问题 在AWS中如何使用lambda函数将文件从一个s3存储桶复制到另一个s3存储桶 - In AWS how to Copy file from one s3 bucket to another s3 bucket using lambda function 如何使用 aws java sdk 将文件从 S3 存储桶从一个区域复制到另一个区域? - How to copy files from S3 bucket from one region to another region using aws java sdk? 将文件从一个 AWS 帐户的 S3 存储桶复制到另一个 AWS 帐户的 S3 存储桶 + 使用 NodeJS - Copy files from one AWS account's S3 bucket to another AWS account's S3 bucket + using NodeJS 如何使用iOS SDK将AWS S3文件从一个存储桶复制到另一个存储桶 - How to copy an AWS S3 file from one bucket to another using iOS SDK 如何使用 Lambda 将文件从一个文件夹移动到同一 AWS S3 存储桶中的另一个文件夹? - How to move a File from One folder to Another Folder in the same AWS S3 bucket using Lambda? 使用python一次将1000个文件从一个s3存储桶传输到另一个存储桶 - transfer 1000 files at a time from one s3 bucket to another using python 如何将大量数据从 aws S3 存储桶传输到另一个存储桶? - How to transfer large amount of data from aws S3 bucket to another? 使用Lambda将S3数据从一个AWS账户推送到另一个S3存储桶 - Pushing S3 data from one AWS account to another S3 bucket using Lambda 如何使用.Net Core 将文件从 S3 Bucket 传输到 AWS SQS? - How to transfer files from S3 Bucket to AWS SQS using .Net Core? 使用 AWS lambda 将文件从一个 s3 存储桶移动到 AWS 中的另一个存储桶 - Move files from one s3 bucket to another in AWS using AWS lambda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM