title: Scan with filter returns zero results in DynamoDB
body: <p>I have a table with approximately 300 000 rows in DynamoDB. It contains three columns: source, data and cycles. The source attribute is a hash key and data is a range key. The cycles attribute is a number which is added by the application each time a row is to be added. I used to scan these rows with the following filter:</p>
  
  <pre><code>{
      TableName: "tableName",
      Limit: 20,
      ScanFilter: {
          cycles: {
              AttributeValueList: [
                  {
                      N: "0"
                  }
              ],
              ComparisonOperator: "EQ"
          }
      }
  }
  </code></pre>
  
  <p>However, this scanfilter spontaneously seems to have decided not to work properly anymore. Anytime I execute this request it will return zero results. When I remove the scanfilter it returns 20 results, so I assume it has nothing to do with the limit or tableName attributes. The funny thing is that when I set the filter to find items with cycles equals "1" it actually works, maybe because there are 10 rows with cycles = 1 at the start of the table.</p>
  
  <p>My question is simply how to fix this. Should I add a new index, or should I change this scanfilter? I can also try to use the query command instead of scan, but my previous attempts to do this didn't work out either.</p>