So, with a very simple DynamoDB table, with Primary key let's say: Address: string (eg: '1 someRd,someCity,someCounty'
and a GSI: Postcode: string
If I try to manually add an item to the table, with just an Address field and no Postcode, it throws an error: One or more parameter values are not valid. A value specified for a secondary index key is not supported. The AttributeValue for a key attribute cannot contain an empty string value. IndexName: Postcode, IndexKey: Postcode
I assumed that sparse GSI's were allowed as per: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-indexes-general-sparse-indexes.html
So, if we set a GSI does that field need to be included on every item in the table?