I am trying to update one of my secondary indexes in my DB but I am getting the following error
'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
and no matter where I look I cannot find anything on SerializationException
errors. Here is my array set up
Array
(
[TableName] => usuarios
[GlobalSecondaryIndexUpdates] => Array
(
[Update] => Array
(
[IndexName] => nombre-creado-index
[ProvisionedThroughput] => Array
(
[ReadCapacityUnits] => 50
[WriteCapacityUnits] => 50
)
)
)
)
and not matter what I try I cannot see where the error stands. I can query and update the tables without any issue. I can also run describeTable
and get all table content with no problem. Any ideas where I could be having problems?
The error was in the array, an associative array, not the procedure, here is the correct set up
Array
(
[TableName] => usuarios
[GlobalSecondaryIndexUpdates] => Array
(
[0] => Array
(
[Update] => Array
(
[IndexName] => nombre-creado-index
[ProvisionedThroughput] => Array
(
[ReadCapacityUnits] => 50
[WriteCapacityUnits] => 50
)
)
)
)
)