
According to AWS doc (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SecondaryIndexes.html):
The key schema for the index. Every attribute in the index key schema must be a top-level attribute of type String, Number, or Binary. Other data types, including documents and sets, are not allowed. Other requirements for the key schema depend on the type of index:
For a global secondary index, the partition key can be any scalar attribute of the base table. A sort key is optional, and it too can be any scalar attribute of the base table.
For a local secondary index, the partition key must be the same as the base table’s partition key, and the sort key must be a non-key base table attribute.
So this means the nested attribute cannot be used as primary key or sort key in the local or global secondary index, right? However, in the Dynamodb section of Chapter 2, it is talking about using nested attribute as partition/sort key of secondary index. Is that correct? Do I misunderstand?
Thanks