Added S3 support in KMeanTrain