title: Pagination in boto3 ec2 describe instance
body: <p>I am having an issue with pagination in boto3 &amp; not getting all instances in the aws account.</p>
  
  <p>Only getting 50% of the instances with below (around 2000 where as there are 4000)</p>
  
  <p>Below is my code </p>
  
  <pre><code>import boto3
  
  ec2 = boto3.client('ec2')
  
  paginator = ec2.get_paginator('describe_instances')
  response = paginator.paginate().build_full_result()
  
  ec2_instance = response['Reservations']
  
  
  for instance in ec2_instance:
      print(instance['Instances'][0]['InstanceId'])
  </code></pre>