I think I made a big mistake...

Sooooo I think I made a pretty big mistake with Glacier… I was completely new to AWS at the time and was interested in cold storage. So being the noob that I was, I loaded about a TB into a Glacier archive using a GUI tool and left it there. Now I want to delete it, but the only way is to empty the vault first. I ran the job using AWS cli to get a list of the ArchiveID’s so that I could recursively delete them. However, it is about 1 million ArchiveID’s since I didn’t think to zip everything first. I’m worried that sending 1 million requests will cause my bill to skyrocket. Would AWS support just be able to delete the vault for me or does anyone have any other ideas? Thanks!

Close the account. Billing will stop immediately. You get 90 days to change your mind.

Can’t. I use this AWS account for a ton of other things. Migrating to a new account would take forever and I don’t have the time. This vault is costing me $4/mo which is basically a rounding error, but I still want to save the $$.

If data has been there 90 days, delete requests are free.

Otherwise it’s prorated to 90 days total storage for early deletes.

Create a lifecyle rule, that should delete all files without additional costs

just double checked, lifecycle deletes don’t cause additional charges

This is the easiest way to go about this….

If he’s using the old glacier service, this option doesn’t exist.

This is also fraud. Don’t recommend crime please.

Important thing to clear up - can you confirm that this data is stored in the service called “S3 Glacier”, rather than the service called “S3” using the Glacier storage classes? From your description of Vaults and ArchiveIDs, I suspect this to be the case.

The pricing page for S3 Glacier is at https://aws.amazon.com/s3/glacier/pricing/. Notably, the only requests that have a cost in that service are UPLOAD requests:

LISTVAULTS, GETJOBOUTPUT, DELETE† and all other Requests are free.

However, you might also note the below:

† S3 Glacier archives have a minimum 90 days of storage, and archives deleted before 90 days incur a pro-rated charge equal to the storage charge for the remaining days. Learn more.

Unfortunately, you’re more or less on the hook for 3 months of storage costs. Happily, that’s only about $10.

For the mechanics of deletion, you’ll have to send all the DeleteArchive requests individually, since there’s no bulk API. This has no AWS API cost, but might take quite a while!

As a future note: don’t use S3 Glacier (vaults and archives) - use the S3 Glacier storage classes (buckets and objects).

It’s not fraud, closing an account is perfectly valid. Cancelling the credit card associated with the account would be more dubious (and in particular wouldn’t get you off the hook for the charges)

Given OP talks about vaults, archives, ArchiveIDs, etc. you’re probably right - this is not S3’s Glacier storage classes, it’s the service confusingly named “S3 Glacier”. You’re also correct that lifecycle is not an option in this case

If you’ve got a mix of storage classes in your bucket then this might be a problem.
If you want to delete everything then there is an empty bucket option in the GUI but not the API and consequently not the CLI either.

If you’ve got versioning on the bucket then I’m not sure if you have to run it twice. Once for current versions, then for non-current versions.

Thanks for the response. Yes this is the old S3 Glacier, not S3 with a Glacier class. I’ve already had it for so long. I’ll just have to let that PS script run to delete everything. It takes about 3 seconds per call and around a million calls so it’ll be a while haha. I was hoping for a quicker way, but I appreciate your help

No worries! You might get a bit of a speed boost using CloudShell in the same region as your Vault, since you’ll cut down on TCP overhead etc.

Correct. It’s the old school version from a few years ago. Running this script to delete each ArchiveID one at a time will take 34 days to get through all 1m of them… Gotta be a better way.

You can run more delete calls in parallel, instead of serializing them.

What’s the ~Sudo rm -rf~ for that service?

Right?! lol

Run things async. Split the script into 20 scripts and run each in parallel. I did that with some S3 API calls and deleted about 900M files in 20 hours