Skip to content

Instantly share code, notes, and snippets.

View nick-stocks's full-sized avatar

Nick Stocks nick-stocks

  • 03:41 (UTC +01:00)
View GitHub Profile
@nick-stocks
nick-stocks / README.md
Created July 22, 2021 08:49 — forked from magnetikonline/README.md
Delete all AWS S3 bucket versioned objects and delete markers.

Delete all S3 versioned objects and delete markers

Quick and dirty Bash script to iterate an S3 bucket and remove all object versions and delete markers.

Probably only usable on buckets with a few hundred version objects maximum, otherwise it might be more efficient and time effective to use a lifecycle rule to age out and remove objects in bulk.

Reference