Great article. I have a question regarding the speed. In the article if we compare the removing multiple files command to the removing files with a path prefix. Is there any chance one might be faster than the other? I have a gigantic bucket and even a small difference could mean a lot for me. My reasoning behind is that a prefix like "content/.pdf" is checking for yet another additional thing hence the query should take longer if the include prefix was simply ".pdf" Would really appreciate getting that information.
Tobias Schmidt
Freelance Fullstack Software Engineer
Hi Shaheer!
If you want to delete a bucket with a huge number of files, there's a simple secret: create a lifecycle rule that expires all of your files.
This way you don't need a blocking command and AWS will take care of deleting the files in a background process.
This works with an unlimited number of files 💪