如果文件夹名称使用AWS GLUE或LAMBDA匹配,则将文件夹从AWS存储库中的一个文件夹复制到另一个文件夹

发布于 2025-01-22 07:56:11 字数 196 浏览 3 评论 0原文

我有2个AWS存储桶登台,目的地都具有相同数量的子文件夹,让我们假设3。 如此登台的3个名称为A,B,C和目的地具有3 a,b,c。现在,我想从3个子文件夹A,B,C到目的地A,B和C中复制文件,仅当使用AWS GLUE或AWS匹配该名称IE A与A,B,B,B,C到C时,它仅在另一个存储桶中存在。 Lambda。另外,该子文件夹中的文件A,B和C内部的文件可以是任何类型的。

I have 2 AWS buckets staging and destination both have the same number of subfolders let's assume 3.
So staging as 3 named a, b, c and destination have 3 a, b, c. Now i want to copy files from 3 subfolders a, b, c to destination a, b, and c which is present in another bucket only when the name matches ie a to a, b to b, c to c using AWS glue or AWS lambda. Also, the file inside this subfolder a, b, and c can be of any type.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愿与i 2025-01-29 07:56:11

您可以使用Python在Lambda中使用这样的解决方案;
通过boto3 同步两个桶

您可以使用CLI。检查页面底部的示例。
https://docs.aws.aws.aws.aws.amazon.com/cli.com/cli/cli/最新的/参考/s3/sync.html

您还可以从控制台设置S3批次复制。
https://aws.amazon.com/about-aws/whats-new/2022/02/amazon-s3-batch-replication-synchronizes-exististing-data-data-between-between-backets/

You could use a solution like this in lambda using python;
Sync two buckets through boto3

You could use the cli. Check the examples at the bottom of the page.
https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html

You could also set up s3 batch replication from the console.
https://aws.amazon.com/about-aws/whats-new/2022/02/amazon-s3-batch-replication-synchronizes-existing-data-between-buckets/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文