3 ms·
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
by supriyo-biswas 3y ago
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_ListObjectsV2.html https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObje...
[2] https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteOb...
- vlovich123 3y agoWhile 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.
- leros 3y agoAt the time, the lifecycle policy didn't seem to be an option on DO unfortunately.
- supriyo-biswas 3y agoLifecycle requests are a good call, but being an asynchronous process, it may take some time to be processed, even when using S3. On a particularly large bucket, I've observed it taking over a week in one instance. The console isn't magic however, it makes the same ListObjectsV2 + DeleteObjects calls in parallel.