What is the DynamoDB equivalent of
SELECT MAX(RANGE_KEY) FROM MYTABLE WHERE PRIMARYKEY = "value"
The best I can come up with is
from boto.dynamodb2.table import Table as awsTable
tb = awsTable("MYTABLE")
rs = list(tb.query_2(PRIMARYKEY__eq="value", reverse=True, limit=1))
MAXVALUE = rs[0][RANGE_KEY]
Is there a better way to do this?