0

my bucket structure is something like this

bucket_name/site_name/folder_name

I just want to get folder_name I tried using something like this

objs = s3.list_objects_v2(Bucket=bucket_name ,Prefix='site_name/')['Contents']

but issue is there is atleast 1000 files in folder_name and data limit of api is exceding .

in 2nd option I tried to apply pagination but that taking alot of time. is there any way to get easily just folder names ?

rright
  • 11
  • 3
  • Does the linked Answer satisfy your Question? If not, please tell us more about what you are wanting to achieve. Are you simply wanting to get a list of all 'folders' within `site_name`? If so, the linked answer shows how to do this. – John Rotenstein Oct 27 '22 at 21:22

0 Answers0