AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

Use nested attributes in secondary index of DynamoDB?

According to AWS doc (

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?


0 Answers

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?