Created
October 29, 2013 20:56
-
-
Save JNajera/7222443 to your computer and use it in GitHub Desktop.
Revisions
-
JNajera created this gist
Oct 29, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ require "rubygems" # optional require "aws/s3" AWS::S3::Base.establish_connection!( :access_key_id => 'INSERT_ACCESES_KEY_ID', :secret_access_key => 'INSERT_SECRET_ACCESES_KEY') buckets = AWS::S3::Service.buckets puts 'Start deleting buckets...' buckets.each_with_index do |bucket, index| puts "Deleting #{bucket.name} bucket... (#{index+1}/#{buckets.count})" AWS::S3::Bucket.delete(bucket.name, :force => true) end puts 'S3 buckets deleted...'