title: How to create Elastic Beanstalk Environment from boto3
body: <p>I need to create Elastic Beanstalk Environment from boto3.</p>
  
  <p>For which I guess the API sequence should be:</p>
  
  <ul>
  <li><strong>create_application()</strong></li>
  </ul>
  
  <p>From this API we get the "Application Name":</p>
  
  <ul>
  <li><strong>create_environment(<em>kwargs</em>)</strong></li>
  </ul>
  
  <p>Here i am passing below json as <code>kwargs</code> to api</p>
  
  <hr>
  
  <pre><code>{
    "ApplicationName": "APP-NAME",
    "EnvironmentName": "ABC-Nodejs",
    "CNAMEPrefix": "ABC-Neptune",
    "SolutionStackName": "64bit Amazon Linux 2016.03 v2.1.1 running Node.js"
  }
  </code></pre>
  
  <h2>Questions:</h2>
  
  <ol>
  <li>How to mention that the Environment EC2 should be attached to which
  VPC and subnet</li>
  <li>In which Subnet its ELB should be created</li>
  </ol>
  
  <p>Any sample code will be helpful
  Please Note: I have one public and one private subnet, we can control the creation of EC2 and ELB creation through subnet IDs</p>