in the boto3 documentation, updating an element is described in the following example:
table.update_item( Key={ 'username': 'janedoe', 'last_name': 'Doe' }, UpdateExpression='SET age = :val1', ExpressionAttributeValues={ ':val1': 26 } )
But what should I do if I want to update multiple element values. I could not find any information about this. Can anyone help? Thanks!
EDIT:
Well, it looks like this is so, can someone confirm that this is the right way. Just to be sure that I am not doing anything completely wrong here.
table.update_item( Key={ 'id': item['id'] }, UpdateExpression='SET value1 = :val1, value2 = :val2', ExpressionAttributeValues={ ':val1': someValue1, ':val2': someValue2 } )
Thanks!
source share