def delete_bucket(bucket_name)
      begin
        s3 = AWS::S3.new
        bucket = s3.buckets[bucket_name]
        bucket.delete!

      rescue AWS::Errors::Base => s3e
        raise S3AccessError.new(s3e.http_response), s3e.message
      end
    end
def delete_bucket(bucket_name)
      begin
        s3 = AWS::S3.new
        bucket = s3.buckets[bucket_name]
        bucket.delete!

      rescue AWS::Errors::Base => s3e
        raise S3AccessError.new(s3e.http_response), s3e.message
      end
    end
Deletes a bucket and its contents using the S3 API.