Lost some files in AWS Glacier? I found 'em
The biggest “issue” I have with the AWS S3 service (and therefore glacier) is that you have no search in the web console. Which means I’d have to flip through every single bucket, every single folder, and check the “storage class” on every single object by hand. That sounds obnoxious (I have lots of stuff in S3) and a really good task to be outsourced to a program. Since Node.JS is my language of choice, I wrote a quick script to find every file in S3 that was in my Glacier.
Allow me to present the aptly named “find-glacier".
The script does work with S3 buckets in any region, which posed an interesting challenge. Due to the way AWS is setup, it has to connect to every region you have buckets in (handled automatically). The other interesting piece was learning how to use the ‘q’ library which is “A library for promises”. It helped me massively by staying out of the “pyramid of doom” (as they call it) and taught me about the proper use of asynchronous calls, tracking embedded async calls, etc. It’s not a terribly long script, but it was an interesting project to cut my teeth on. Hopefully, it helps someone else with the same “where is that ##$$ file” problem I had.