Sateesh
Sateesh

Reputation: 403

com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: Cannot read from backfilling global secondary index

We keep getting this exception in our app which has a scheduled job to read on a gloabl secondary index. Looks like it keeps backfilling periodically even though there were no changes on the table. The volumes on our table are quite low so a bit surprised to see this a few times a day. This is not a new index, so wondering should it not backfill only on insert/update of records. Anyone seen this before?

Upvotes: 38

Views: 22831

Answers (5)

ACV
ACV

Reputation: 10562

Check your console if it says creating it means need to wait:

enter image description here

Upvotes: 1

Praveen Singh
Praveen Singh

Reputation: 101

This error occurs when you newly create a GSI in dynamodb Table. wait for sometimes once it get created into the table you will not see the error see in below image it says Creating... enter image description here

it will be like enter image description here

then hit your function you will not get an error

Upvotes: 10

DanteDX
DanteDX

Reputation: 1259

I just waited 30 seconds, the error was gone away automatically. I edited my dynamoDB table from my aws console directly, I think this temporary error originated from this.

Upvotes: 15

Khader M A
Khader M A

Reputation: 6301

It might be creating that GSI. Wait for sometime based on the amount of data in your DB. And this issue will go away.

Upvotes: 51

Rahul Rai
Rahul Rai

Reputation: 44

Try Detecting and Correcting Index Key Violations. I guess it is due to Index key Violation.

Upvotes: 0

Related Questions