title: How do I get the IP ranges for EC2 instances in specific regions
body: <p>I need to know what IP subnet will be used by AWS EC2 instances</p>
  <p>Reading:</p>
  <ul>
  <li><a href="https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html</a></li>
  <li><a href="https://superuser.com/questions/989123/amazon-ec2-public-ip-address/989400">https://superuser.com/questions/989123/amazon-ec2-public-ip-address/989400</a></li>
  </ul>
  <p>I understand that I can use this URL giving the IP ranges:</p>
  <ul>
  <li><a href="https://ip-ranges.amazonaws.com/ip-ranges.json" rel="nofollow noreferrer">https://ip-ranges.amazonaws.com/ip-ranges.json</a></li>
  </ul>
  <p>But I am a bit confused by the output.</p>
  <p>I understand I need to filter on:</p>
  <ul>
  <li>region</li>
  <li>type: EC2</li>
  </ul>
  <p>Is my understanding correct ?
  If so I get 137 IP subnets which is very important number.</p>
  <p>How can I have more control on IP subnets ?</p>