News for hackers. Stuff that matters.
Re:Deleting an S3 Bucket Costs Money by edwnj on Tuesday October 19, 2021 @09:01AM (#28917590)
Its silly that they wont just let you delete the whole bucket but this actually pretty cheap tho.

Based on some quick maths, deleting a million files would only cost you like $5.

P.S. Again its silly they do this and I'm probably greatly underestimating how these costs can add up for mid to large orgs.

Re:Deleting an S3 Bucket Costs Money by 238475235243 on Tuesday October 19, 2021 @09:03AM (#28917609)
Yes but some of us have many billions of objects. From memory, 4 billion object is $20k to delete.
Re:Deleting an S3 Bucket Costs Money by billyhoffman on Tuesday October 19, 2021 @09:30AM (#28917867)
No it’s not. Deleting 4B objects costs $20, via DELETE and LIST requests.

As the article says DELETEs are free and you can do bulk deletes of 1000 objects at a time. However you need to have the object names. You get those using LIST, which gives you 1000 items for each request. LISTs are currently priced at $0.005 per 1000 List requests. So $0.005 to delete 1M objects. Using the “empty bucket” feature does this internally and charges you that exact same amount.

The only way you get near your price is if you try to delete by applying a new lifecycle policy to 4B objects that are not in Standard storage.

Re:Deleting an S3 Bucket Costs Money by vdm on Wednesday October 20, 2021 @05:10AM (#28928477)
This.

If you can select your objects with a lifecycle policy (by object tag or prefix) you don't need the LISTs either. The prefix can be "" to select all objects. Just be careful with that.

Re:Deleting an S3 Bucket Costs Money by mytailorisrich on Tuesday October 19, 2021 @09:24AM (#28917800)
I think the takeaway is to maintain your own database of references to objects if you can.
Re:Deleting an S3 Bucket Costs Money by ignoramous on Tuesday October 19, 2021 @09:35AM (#28917914)
S3 isn't really built for lots of small objects, which is also quite tellingly reflected in its pricing (and performance in dealing with those).

Right now, anything less than 400KB should really be plonked into its cousin, DynamoDB.

Other than that, I fully expect AWS to announce a new S3 bucket type (and pricing) for high-volume, small-size blobs. There is also a small matter of addressing Cloudflare R2, which should result in a Lighsail-EC2-esque fork of S3.

Re:Deleting an S3 Bucket Costs Money by edwnj on Tuesday October 19, 2021 @09:42AM (#28917988)
UPDATE: i fucked up the maths, thought it was $0.005 per list request. Its $0.005 for 1k list requests, so its more like $0.005 per million objects..

thats really really cheap.