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.

1

There are 1 best solutions below

0
On

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/