update is running even if data is not present in dynamodb
const params = {
TableName: 'users',
Key: {
'userId': '123'
},
UpdateExpression: 'SET isActive = :isActiveVal',
ConditionExpression: 'attribute_exists(userId)',
ExpressionAttributeValues: {
':isActiveVal': 'false'
},
ReturnValues: "ALL_NEW"
};