Created
September 27, 2013 10:22
-
-
Save jarohen/6726595 to your computer and use it in GitHub Desktop.
Deleting all objects in an S3 bucket, from Clojure (probably in a very inefficient way - sorry.)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (loop [] | |
| (when-let [objs (seq (map :key (:objects (aws.sdk.s3/list-objects (aws-creds) bucket))))] | |
| (println "Deleting 1000 objs") | |
| (dorun (pmap #(aws.sdk.s3/delete-object (aws-creds) bucket %) objs)) | |
| (recur))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment