I'm simply trying to retrieve the max value of my primary keys with a query/scan using Boto3. I'm trying to accomplish this so my program can simply increment a variable I'll set equal to the max "ID" value by 1 for the next table entry.
response = table.scan(
FilterExpression=Attr('ID'). #Here is where I'd assume a condition
) #is placed to find the highest value but
#the Boto3 doc doesn't seem to have a
#method like 'max()' or something...
Searching around I found how to do this using the original 'boto' so I'm sure there is a way using its newer version 'boto3' but I haven't found anything yet.
Any help/guidance would be greatly appreciated! Thanks!
Boto3 Doc: http://boto3.readthedocs.io/en/latest/guide/dynamodb.html#querying-and-scanning