code: func (b *DynamoDBBackend) getRecords(ctx context.Context, startKey, endKey string, limit int, lastEvaluatedKey map[string]*dynamodb.AttributeValue) (*getResult, error) {
  	query := "HashKey = :hashKey AND FullPath BETWEEN :fullPath AND :rangeEnd"
  	attrV := map[string]interface{}{
  		":fullPath":  startKey,
  		":hashKey":   hashKey,
  		":timestamp": b.clock.Now().UTC().Unix(),
  		":rangeEnd":  endKey,
  	}
  
  	// filter out expired items, otherwise they might show up in the query
  	// http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html
  	filter := fmt.Sprintf("attribute_not_exists(Expires) OR Expires >= :timestamp")
  	av, err := dynamodbattribute.MarshalMap(attrV)
  	if err != nil {
  		return nil, convertError(err)
  	}
  	input := dynamodb.QueryInput{
  		KeyConditionExpression:    aws.String(query),
  		TableName:                 &b.Tablename,
  		ExpressionAttributeValues: av,
  		FilterExpression:          aws.String(filter),
  		ConsistentRead:            aws.Bool(true),
  		ExclusiveStartKey:         lastEvaluatedKey,
  	}
  	if limit > 0 {
  		input.Limit = aws.Int64(int64(limit))
  	}
  	out, err := b.svc.Query(&input)
  	if err != nil {
  		return nil, trace.Wrap(err)
  	}
  	var result getResult
  	for _, item := range out.Items {
  		var r record
  		dynamodbattribute.UnmarshalMap(item, &r)
  		result.records = append(result.records, r)
  	}
  	sort.Sort(records(result.records))
  	result.records = removeDuplicates(result.records)
  	result.lastEvaluatedKey = out.LastEvaluatedKey
  	return &result, nil
  }
docs: // getRecords retrieves all keys by path