AWS Certified Solutions Architect - Professional 2020

Sign Up Free or Log In to participate!

Constraints for secondary index keys

Starting from approximately 07:58, the secondary index examples imply that choosing an attribute in a nested object as a key of the index is possible, which is not true for DynamoDB. According to this document (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.

My experiments with DynamoDB also aligned with this behavior that the document describes.

If I’m not missing anything here, please kindly update the lecture to avoid confusion for other audience.

1 Answers

Thanks for pointing that out Michael.   That lecture is on my to-do list for some edits and I was planning on replacing the nested JSON in the example with a more flattened version and explain Overloading for a GSI that’s documented in the DynamoDB Best Practices.
It’ll be updated soon.Thanks!
Sign In
Welcome Back!

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

Get Started
Who’s going to be learning?