code: public static void launchEC2(Class<? extends Job> job, int boxes) throws Exception {
      EC2 ec2 = new EC2();
      ec2.boxes = boxes;
      Cloud c = ec2.resize();
      launch(c, job);
    }
docs: Starts EC2 machines and builds a cluster.