iasjkk commited on
Commit
8f66156
·
verified ·
1 Parent(s): f3b7f92

Update s3_migration.py

Browse files
Files changed (1) hide show
  1. s3_migration.py +11 -0
s3_migration.py CHANGED
@@ -87,3 +87,14 @@ if __name__ == '__main__':
87
  num_processes = 4 # Adjust the number of processes as needed
88
 
89
  migrate_files_to_s3(folder_path, s3_bucket, s3_folder, num_processes)
 
 
 
 
 
 
 
 
 
 
 
 
87
  num_processes = 4 # Adjust the number of processes as needed
88
 
89
  migrate_files_to_s3(folder_path, s3_bucket, s3_folder, num_processes)
90
+
91
+
92
+
93
+ import boto3
94
+
95
+ s3 = boto3.client('s3')
96
+ response = s3.list_objects_v2(Bucket='your-bucket-name', Prefix='')
97
+
98
+ for obj in response['Contents']:
99
+ if obj['Key'].endswith('/'):
100
+ print(obj['Key'])