'DynamoDB queries on Hierachical structures

On this lecture, the speaker gives two examples of Hierarchical Structures:

  1. as item collections enter image description here

  2. as Documents (JSON) enter image description here

Suppose it is needed to query for movies in which a particular actor appeared or the length of tracks, how would one proceed to achieve this?

I have a feeling that creating GSIs would work for the first case, but have no clue if it would be possible in the second case.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source