title: DynamoDB between query on String attribute
body: <p>Working with <a href="http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/API_Query.html" rel="nofollow noreferrer">Query</a>  API from DynamoDB. 
  Entities table has hash-and-range primary key. Range column is of String type.
  While doing BETWEEN query on range key I got strange results:</p>
  
  <p><img src="https://i.stack.imgur.com/zjLoz.png" alt="query">
  <a href="https://i.imgur.com/VDBnx.png" rel="nofollow noreferrer">bigger</a></p>
  
  <p>And documentation is not very clear:</p>
  
  <p><em>BETWEEN : Greater than, or equal to, the first value and less than, or equal to, the second value.
  For BETWEEN, AttributeValueList must contain two AttributeValue elements of the same type, either String or Number (not a set). A target attribute matches if the target value is greater than, or equal to, the first element and less than, or equal to, the second element. If an item contains an AttributeValue of a different type than the one specified in the request, the value does not match. For example, {"S":"6"} does not compare to {"N":"6"}. Also, {"N":"6"} does not compare to {"NS":["6", "2", "1"]}.</em></p>
  
  <p>Can anybody explain this results?</p>