我正在尝试更新我的数据库中的一个二级索引,但是我收到以下错误
'Error executing "UpdateTable" on "https://dynamodb.us-east-1.amazonaws.com"; AWS HTTP error: Client error: 400 SerializationException (client): Start of structure or map found where not expected. - {"__type":"com.amazon.coral.service#SerializationException","Message":"Start of structure or map found where not expected."}' exception 'GuzzleHttp\Exception\ClientException' with message 'Client error: 400' in _aws/3.3.0/GuzzleHttp/Middleware.php:69 Stack trace: #0
无论我在哪里,我都找不到SerializationException
错误。这是我的阵列设置
Array
(
[TableName] => usuarios
[GlobalSecondaryIndexUpdates] => Array
(
[Update] => Array
(
[IndexName] => nombre-creado-index
[ProvisionedThroughput] => Array
(
[ReadCapacityUnits] => 50
[WriteCapacityUnits] => 50
)
)
)
)
无论我尝试什么,我都看不出错误的位置。我可以毫无问题地查询和更新表。我也可以运行describeTable
并获得所有表格内容没有问题。我有什么想法可能有问题吗?
答案 0 :(得分:0)
错误在数组中,是一个关联数组,而不是过程,这里是正确的设置
Array
(
[TableName] => usuarios
[GlobalSecondaryIndexUpdates] => Array
(
[0] => Array
(
[Update] => Array
(
[IndexName] => nombre-creado-index
[ProvisionedThroughput] => Array
(
[ReadCapacityUnits] => 50
[WriteCapacityUnits] => 50
)
)
)
)
)