Estoy tratando de actualizar uno de mis índices secundarios en mi base de datos pero recibo el siguiente 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
y no importa dónde mire, no puedo encontrar nada sobre los errores de SerializationException
. Aquí está mi matriz configurada
Array ( [TableName] => usuarios [GlobalSecondaryIndexUpdates] => Array ( [Update] => Array ( [IndexName] => nombre-creado-index [ProvisionedThroughput] => Array ( [ReadCapacityUnits] => 50 [WriteCapacityUnits] => 50 ) ) ) )
y no importa lo que intente, no puedo ver dónde está el error. Puedo consultar y actualizar las tablas sin ningún problema. También puedo ejecutar describeTable
y obtener todo el contenido de la tabla sin ningún problema. ¿Alguna idea de dónde podría estar teniendo problemas?
El error estaba en la matriz, una matriz asociativa, no en el procedimiento, aquí está la configuración correcta
Array ( [TableName] => usuarios [GlobalSecondaryIndexUpdates] => Array ( [0] => Array ( [Update] => Array ( [IndexName] => nombre-creado-index [ProvisionedThroughput] => Array ( [ReadCapacityUnits] => 50 [WriteCapacityUnits] => 50 ) ) ) ) )