data.setData(userData);
launchSpec.setUserData(data);
}
launchSpec.setInstanceType(instanceType);
final RequestSpotInstancesType request = new RequestSpotInstancesType();
request.setInstanceCount(new BigInteger(instanceCount));
request.setSpotPrice(spotPrice);
request.setLaunchSpecification(launchSpec);
request.setType(type);
try {
return serviceRM.requestSpotInstances(request);
} catch (RemoteException e) {