The Scan API is similar to the Query API except that since we want to scan the whole table and not just a single Item Collection, there is no Key Condition Expression for a Scan. However, you can specify a Filter Expression which will reduce the size of the result set (even though it will not reduce the amount of capacity consumed).
Let us look at the data in the Reply table which has both a Partition Key and a Sort Key. Select the left menu bar Item explorer. You may need to click the hamburger menu icon to expand the left menu if its hidden.
Once you enter the Item explorer you might need to click the > button to expand the Tables list
And then choose the Reply table.
For example, we could find all the replies in the Reply that were posted by User A.
You should see 3 Reply items posted by User A.
Explore the data in the Forum table and write a scan command to return only the Forums that have more than 1 thread and more than 50 views.
Hint: Read about Reserved Words in DynamoDB and how to deal with situations where one of your attribute names is a reserved word.
The solution is expandable below but try to figure it out yourself before moving forward.
Click below to expand and see the exercise solutions
For this access pattern we will need to make a FilterCondition with clauses on both the Threads and Views attributes before clicking Run.