I have written some python code, I want to query dynamoDB data by sort key. I remember I can use follow-up code successful:
table.query(KeyConditionExpression=Key('event_status').eq(event_status))
My table structure column
primary key:event_id
sort key: event_status
You have to create a global secondary index (GSI) for the sort key in order to query on it alone.