I have to query a dynamoDB table with boto3 by using the GSI and the PK, my GSI is a date and I need to get the latest date, but i don't know how to query on GSI and on the PK...
My code
if pk_id:
self.__logger.info(f"DynamoDB : get current object attached to pk {pk_id}")
item_found = self.table_query(???)
if item_found is not None and item_found.get('Items'):
return item_found
else:
return {}