* @return list of newly launched instances
*/
public static List<Instance> launchInstance(String AMI_ID, String type, Integer number, String keyname) {
List<Instance> resultList = new ArrayList<Instance>();
RunInstancesRequest request = new RunInstancesRequest(AMI_ID, number, number);
request.setInstanceType(type);
request.setKeyName(keyname);
RunInstancesResult result = getEC2Client().runInstances(request);
resultList.addAll(result.getReservation().getInstances());
return resultList;
}