How to query dynamodb table. You can change the table name and index name if required.