I am trying to update items in DynamoDB table. The code that I have written is updating the item but when I add a column with the header "source/target", it is giving a "ValidationException" Exception.
Code used to update -
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table("test")
response = table.update_item(
Key={
'id': "test_id
},
UpdateExpression="set source/target= :st, user_name= :usr",
ExpressionAttributeValues={
':st' : event['source/target'],
':usr' : event['user_name']
},
ReturnValues="UPDATED_NEW"
)
The error I get is -
An error occurred (ValidationException) when calling the UpdateItem operation: Invalid UpdateExpression: Syntax error; token: \"/\", near: \"source/target\""
How to solve this?