title: AWS EC2 Java SDK: Start an instance with custom instance type
body: <p>I am trying to start an EC2 instance though Java code. I added this maven dependency in my project:</p>
  
  <p><a href="https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-ec2/1.11.308" rel="nofollow noreferrer">https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-ec2/1.11.308</a></p>
  
  <p>It provides me with a class, which can be used to request starting an instance. The code is as follows:</p>
  
  <pre><code>StartInstancesRequest startReq = new StartInstancesRequest()
                  .withInstanceIds(instanceID);
  
  ec2Client.startInstances(startReq);
  </code></pre>
  
  <p>But, there is no <code>with*</code> method in <code>StartInstancesRequest</code> class, which takes instance type as input.</p>
  
  <p>Can anyone please tell me how can I specify instance type too?</p>