Not sure, what is the issue while get item from DynamoDB.
Json View of Data :
{
"section_id": "6177d23bb5f04ca363fe3d91",
"chapter_id": "6177ccd4b5f04ca363fe3d63",
"data": {
}
}
PHP Code :
$sdk = $this->sdk();
$dynamodb = $sdk->createDynamoDb();
$result = $dynamodb->getItem(
array(
'TableName' => 'sections',
'Key' => array(
'section_id' => array(
'S' => '6177d23bb5f04ca363fe3d91'
)
)
)
);
print_r($result);
exit;
Error I'm getting
Type: Aws\DynamoDb\Exception\DynamoDbException
Message: Error executing "GetItem" on "https://dynamodb.ap-south-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://dynamodb.ap-south-1.amazonaws.com` resulted in a `400 Bad Request` response: {"__type":"com.amazon.coral.validate#ValidationException","message":"The provided key element does not match the schema" (truncated...) ValidationException (client): The provided key element does not match the schema - {"__type":"com.amazon.coral.validate#ValidationException","message":"The provided key element does not match the schema"}