Inserting and updating items to DynamoDB lists and maps

Should I use a map or a list? A simple rule: If you need to update or remove an item, lists only allow you to do it by index. While maps let you do it by key. Their simplified representation goes like this: { "someMap": { "key1": "value1", "key2": "value2", }, "someList": ["value1", "value2"] } Inserting and updating to a map The following example adds or updates an instance of “SomeItem” as a json string into a map field called someMapField.