A module to empty an S3 bucket

65 views
Skip to first unread message

Zlatko Đurić

unread,
Aug 12, 2014, 3:23:26 PM8/12/14
to nod...@googlegroups.com
I needed to empty an S3 bucket of test data, but I could find nothing out of the box.

So a bit later you can now:

    npm install empty-s3-bucket -g
    export S3_ACCESS_KEY=key
    export S3_SECRET=secret
    export S3_REGION=us-east-1
    empty-s3-bucket my-bucket

It's not much or very elegant, but it works for me, so I thought it might help somebody else.

Constructive criticism welcome.

--
Zlatko

Andrew Kelley

unread,
Aug 13, 2014, 12:01:13 AM8/13/14
to nod...@googlegroups.com
https://github.com/andrewrk/node-s3-client#clientdeletedirs3params

Yours doesn't work when there are more than 1000 objects in the bucket.
Reply all
Reply to author
Forward
0 new messages