not getting record returned from boto3 dynamoDB scan
See original GitHub issueI am using boto3 to scan a DynamoDB table to find records with a certain ID (articleID or imageID).
For some valid articleIDs the scan returns zero results. If I do the scan with the exact same articleID in the DynamoDB console, it works fine. Through boto3, zero results. If I pick another articleID, the results return as expected.
For the records that don’t return, it also won’t return using the imageID. For the record that does work, it works for either ID. I can’t see any difference between the records. The only thing I can think of is that the ones that don’t work time out, but is there a setting for that in boto3?
Table name articleImages Primary partition key imageID (String) Primary sort key articleID (String)
db = boto3.resource('dynamodb')
imageTable = db.Table('articleImages')
articleID = "Xxp6ntkoUnX4NDEqn8gSVo" #THIS DOESNT WORK HERE BUT DOES IN CONSOLE
articleID = "EqVxu2tcP7EavFGPDw7R5A" # THIS ONE WORKS HERE
response = imageTable.scan(
FilterExpression=Attr('articleID').eq(articleID)
)
thanks in advance
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
Why Your DynamoDB Scan or Query Is Not Returning All Your ...
When your Scan or Query exceeds 1MB worth of data, only a single 'page' of items will be returned. Again, the exact quantity...
Read more >python DynamoDB scan operation not return all records
DynamoDB only returns 1MB per request. You have to loop through and make multiple requests until you get your entire dataset.
Read more >[Solved] dynamodb query not returning the full item - Dynobase
If you are querying a GSI of a table, you will only get the attributes you project onto the index. It may cause...
Read more >DynamoDB — Boto3 Docs 1.26.34 documentation - AWS
Amazon DynamoDB is a fully managed NoSQL database service that provides fast and ... If a requested item does not exist, it is...
Read more >Best practices for querying and scanning data
The problem is not just the sudden increase in capacity units that the Scan uses. The scan is also likely to consume all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Limit=1000 does not work, have to do pagination or create an index for query
One solution using paginator, You can take reference from there: https://stackoverflow.com/questions/36780856/complete-scan-of-dynamodb-with-boto3