I just practice using example code in AWS dynamoDB But, update code do not work with error
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the UpdateItem operation: The document path provided in the update expression is invalid for update
My python code is here. I could update DB without 'map' attribute.
table = dynamodb.Table('Movies')
title = "The Big New Movie"
year = 2015
response = table.update_item(
Key={
"year": year,
"title": title
},
UpdateExpression="set #attrName.rating = :r, #attrName.plot=:p",
ExpressionAttributeNames = {
"#attrName" : "info"
},
ExpressionAttributeValues={
':r': decimal.Decimal(5.5),
':p': "Everything happens all at once."
},
ReturnValues="UPDATED_NEW"
)