title: dynamoDBStreams getRecords() returning empty records when ShardIteratorType is set to LATEST
body: <p>I was trying to retrieve last minute's changes in DynamoDB via dynamodb streams with AWS-SDK for nodeJS.
  I thought of its implementation by using <em>ShardIteratorType</em> as "LATEST". Every time I call getRecords() with the Iterator that I got getShardIterator() it is returning empty records whereas changing <em>ShardIteratorType</em> to "TRIM_HORIZON" returns the objects in that Shard.</p>
  
  <p>I am unable to understand this behaviour. If anyone can help me figure it out, it would be appreciated.</p>
  
  <p>Here is the pseudo code for the implementation.</p>
  
  <pre><code>let getShardIterator = async (shardID) =&gt; {
      let params = {
          ShardId: shardID,
          ShardIteratorType: "LATEST", //using TRIM_HORIZON is working fine
          StreamArn: streamInfo.StreamArn
      };
      return new Promise((resolve, reject) =&gt; {
          dynamoStreams.getShardIterator(params, function (err, data) {
              if (err) reject(err) // an error occurred
              else resolve(data);
          });
      })
  }
  
  let getDataFromIterator = async (params) =&gt; {
      return new Promise((resolve, reject) =&gt; {
          dynamoStreams.getRecords(params, function (err, data) {
              if (err) reject(err, err.stack); 
              else resolve(data);           
          });
      })
  }
  
  let shardIterObj = await getShardIterator(ShardId); 
  let data = await getDataFromIterator(shardIterObj); 
  </code></pre>
  
  <p>Thanks.</p>