'Move CSVs from one AWS S3 Account to Another Boto3 [duplicate]

I have a set of CSVs in an S3 bucket in an AWS account that I want to move to another bucekt in another account. The only approach I can think of (using psuedocode) is the following:

  • connect to bucket a
  • list contents of bucket
  • iterate through list and read in each CSV as a dataframe
  • write dataframe to bucket b

However, I was wondering whether there's another way to do this without explicitly reading the CSVs into memory.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source