Earlier quoted context omitted.
That is a limitation that comes along with having to be S3 compatible; the best you can do is to combine ListObjectsV2[1] + DeleteObjects[2] (1000 objects in a single API call). [1] https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObje... [2] https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteOb...
While S3 doesn’t have a REST API to do it, you can trigger it through the console and it applies pretty quickly if you don’t have a lot of objects (hundreds of thousands if I recall correctly) and will apply in the background otherwise. The way to do it via the s3 API is to install a lifecycle policy to delete everything.
The console isn't magic however, it makes the same ListObjectsV2 + DeleteObjects calls in parallel.