Goal
I would like to be able to write / update StringSet fields in dynamodb using the query editor
Detail
The query editor for dynamodb has a nice toggle: visual vs JSON. The problem is that both settings most likely use the JS SDK with the AWS.DocumentClient under the hood. This means that it doesn't allow specific types in the query
Steps
example update query:
{
"TableName" : "ProductCatalog",
"Key" : { "ID": "789" },
"UpdateExpression" : "ADD Color :c",
"ExpressionAttributeValues": { ":c": ["Orange", "Purple"] }
}
actual dynamodb JSON result:
"Color": {
"L": [{ "S": "Orange" }, { "S": "Purple" }]
}
wanted dynamodb JSON result:
"Color": {
"SS":["Orange", "Purple"]
}
The wanted result is currently not possible. One way to do it would be to allow 'raw' (dynamodb json) in the json editor so we could write
{
"TableName" : "ProductCatalog",
"Key" : {"ID":{"S":"789"}},
"UpdateExpression" : "ADD Color :c",
"ExpressionAttributeValues": {":c": {"SS":["Orange", "Purple"]}}
}
whilst keeping the visual editor for simplified scenarios