title: How does DynamoDB GSI treat missing attributes?
body: <p>Looking at <a href="https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html" rel="noreferrer">this DynamoDB documentation about GSI</a>, I found the following comment:</p>
  
  <blockquote>
    <p>A global secondary index only keeps track of data items where its key attribute(s) actually exist. </p>
  </blockquote>
  
  <p>Which of the following does this exactly mean?</p>
  
  <ol>
  <li>Missing <code>Partition Key</code> and/or <code>Sort Key</code> from GSI point of view will result in no additional item in GSI<br>
  e.g.) "GameTitle" and "TopScore" are required</li>
  <li>Missing data for any attributes you specify as a part of GSI with <code>INCLUDE</code> option will result in no additional item in GSI<br>
  e.g.) All attributes projected to GSI even "Wins", "Loses" are required </li>
  </ol>
  
  <p>I'm suspecting the "key attribute(s)" refer to the 1., and any missing data from <code>INCLUDE</code> option point of view will simply come back as empty when GSI is queried, but wanted to check if my understanding is correct.</p>
  
  <p>Also, would there be no difference between GSI and LSI in this space?</p>