0
votes

In my Dynamodb table of "batches" with partition key "ID" and "Created_at" as sort key and a GSI with "batch_Status".Given a list of statuses

let's say I would like to query the batches with status as "IN Progress", "NEW", "Completed"

Is there a way to query on GSI with a list of values?

I have done for a single value till now

def retrieve_records():
    response = table.query(IndexName="batch_Status-index", KeyConditionExpression=Key("batch_Status").eq("In Progress"))

Appreciate if you can provide a code snippet for list of values

1

1 Answers

1
votes

Currently there is no way to have execute these queries in a single request. The only way to do this is to execute multiple queries. Latency delay should be minimal. It also gives you the opportunity to do them in parallel, which may speed things a bit.