Error: dynamodb scan missing values

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
Scan results can look incomplete because only one page was read, a filter removed items, or a projection omitted attributes. Separate missing items from missing fields. Adding a filter cannot restore data excluded by a projection or a skipped page.
import boto3
db = boto3.client("dynamodb", region_name="us-west-2")
for page in db.get_paginator("scan").paginate(TableName="Orders"):
for item in page.get("Items", []):
print(item)For diagnosis, remove ProjectionExpression and FilterExpression from a read-only scan of an appropriately sized dataset. Then add each back and compare Count with ScannedCount. A filtered scan can return zero items and still have LastEvaluatedKey.
A GSI scan sees only indexed items and projected fields. Items lacking index keys are absent from that index; read the base table when you need the full item. Optional non-key fields can genuinely be missing. ConsistentRead=true on a base-table Scan gives consistent item reads, not a snapshot of the entire table during concurrent writes.
See scan pagination and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- dynamodb attribute does not exist
- DynamoDB Error 413
- could not connect to the endpoint URL dynamodb
- dynamodb index does not exist
- DynamoDB Network Error: self signed certificate in chain
- DynamoDB Failed To Compute Node presentation
- dynamodb does not accept empty set
- Boto3 DynamoDB KeyError
- dynamodb global secondary index does not project
- dynamodb 1 validation error detected value
- dynamodb unable to locate property for key attribute
- dynamodb mapper save not persisting
- dynamodb-admin not working
- dynamodb stream missing fields
- dynamodb put function not working
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today