将文件从 s3 存储桶复制到另一个 AWS 帐户

Copy files from s3 bucket to another AWS account

是否可以将源 AWS S3 存储桶中的文件 send/sync 放入不同位置的不同 AWS 账户的目标 S3 存储桶中?

我发现了这个:https://aws.amazon.com/premiumsupport/knowledge-center/copy-s3-objects-account/

但是如果我没有理解错的话,这就是从目标帐户同步文件的方法。

有没有办法反过来做?从源账户访问目标存储桶(使用源 IAM 用户凭证)。

这需要正确的 IAM 和存储桶策略设置。

讨论了跨帐户访问的详细配置here

配置完成后即可执行同步,

aws s3 sync s3://sourcebucket s3://destinationbucket --recursive

希望对您有所帮助。

A​​WS 终于想出了一个解决方案:S3 batch operations.

S3 Batch Operations is an Amazon S3 data management feature that lets you manage billions of objects at scale with just a few clicks in the Amazon S3 Management Console or a single API request. With this feature, you can make changes to object metadata and properties, or perform other storage management tasks, such as copying objects between buckets, replacing object tag sets, modifying access controls, and restoring archived objects from S3 Glacier — instead of taking months to develop custom applications to perform these tasks.

它允许您在任何存储 class(例如 S3 <> Glacier)和 跨 AWS 账户之间从任何区域到任何区域复制存储桶、前缀或对象级别的数据!无论是数千、数百万还是数十亿个对象。

这个介绍视频概述了这些选项(如果我听起来像个销售人员,我很抱歉,我对此感到非常兴奋,因为我有几百万个对象要复制 ;-)https://aws.amazon.com/s3/s3batchoperations-videos/