I am relatively new to AWS and DynamoDB. I have created a table with an array property. Is it possible for me to scan the array and return objects that contain a certain string?
1 Answer
Yes, you can do this. But keep in mind that a scan is an expensive operation which consumes a lot more read capacity units than a query operation. It would be better if you create a primary key on the column and do a query. You can find some examples here:
http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryScanORMModelExample.html
2 Comments
mathlete
So I can query an array value? Lets say my Table named Photos has a list property users. Can I query all Objects that contain a certain user's id within the list?
Mike Dinescu
@csweeney285 - You could use a filter but it won't be efficient. How many users does a "photo" usually have?