OiO.lk Blog python How move folders, subfolder and files from S3 bucket to another bucket?
python

How move folders, subfolder and files from S3 bucket to another bucket?


i have a question: I want to migrate a buscket structure (folders, subfolders and files) from bucket A to bucket B on a folders created for this migration.

I would like to know:
first – if is it possible ?
second – can somebody give an idea about how could be the code ? (I’m using pyspark or spark)

I try two ways :
using copy_object function
using copy function too

and i think that i will have to iterate over all folders one by one and also sub folders too and to finish get file one by one too and create all the structure again on a differente bucket.

Can somebody help me with this.

Regards



You need to sign in to view this answers

Exit mobile version