Schema Design for DynamoDB with Variable Sort Keys
I'm looking for a bit of guidance on something.
I'm trying to create a dynamodb schema to match an existing one that already exists. I've got a couple of indexes that end up getting used in different ways depending on the type of object being stored, and I'm trying to figure out a good way to model that in schema. For instance, in one type, the sort_key is a constant, we'll call it 'X' for the time being, and in another it's 'Y-<uuid>'. I can think of a couple of ways to do this, but I'm looking for experience here.
My first thought is to have a union of possible options for the sort_key value.