Can we update a dynamodb item only with global secondary index?
$response = $dynamodbClient->updateItem(array(
'TableName' => 'feed',
'Key' => array(
'feed_guid' => array('S' => 'ac1e9683832ad2923f0bd84b91f34381'),
'created_date' => array('N' => '1439295833'),
),
"ExpressionAttributeValues" => array (
":val1" => array('N' => '1')
) ,
"UpdateExpression" => $updateExpression,
'ReturnValues' => 'ALL_NEW'
));
In the above code, I want to replace the key section and update the item using a global secondary index, that is user_id.