amazon-glacier

Delete all achives from AWS S3 Glacier Vault instead of deleting one by one


I am looking for a way to delete multiple archives from AWS S3 Glacier.

I found ways to delete archives by id one by one, using AWSPowershell,awscli and Rest API.

Is there a way in which I can delete all archives in one execution by using any wildcard for the archives' id??


Solution

  • There is no single API or AWS provided single click to do this task. You can write a simple script or will find many examples (like https://gist.github.com/veuncent/ac21ae8131f24d3971a621fac0d95be5).

    You have to - Generate inventory and send delete request for each archive ID.

    You can call AWS APIs as well. During development, you can make REST API calls to Glacier using postman: https://medium.com/@nisarg.1611/how-to-call-aws-s3-glacier-rest-apis-from-postman-e3db527508d5

    Please update if you have found any other way.