I have an AWS lambda function that watches an S3 bucket. When an image is uploaded to the bucket the lambda function creates a thumbnail of the image. However I made a mistake in the function and saved the transformed file in the same directory that was being watched, creating an infinite loop.
It ran for roughly a minute before I stopped it, and in that time created 600,000 images. However, deleting those images (using the AWS console) took about 20 minutes.
Why such a difference? I'm interested in the low-level reasons for this.