1

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 1

0

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

Sign up to request clarification or add additional context in comments.

2 Comments

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?
@csweeney285 - You could use a filter but it won't be efficient. How many users does a "photo" usually have?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.