This is my DynamoDB JSON
{
"follow_count": 3,
"followed_back_count": 4,
"followed_back_users": [
32432
],
"login": "login1",
"target": "target1",
"target_followed_users": [
234232342,
453453434,
241413422
]
}
I need to delete the target_followed_users
from the db so I tired this...
# Update for followed_back_users
table.update_item(
Key={
'login': login,
'target': target,
},
UpdateExpression='DELETE followed_back_users = :followed_back_users',
ExpressionAttributeValues={
':followed_back_users': db_followed_back_users
}
)
I got below error..
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the UpdateItem operation: Invalid UpdateExpression: Syntax error; token: "=", near: "followed_back_users = :followed_back_users"