I am new to AWS. I have installed an EC2 server which processes PhP code. I am able to administrate the DB through the Amazon website. I'm trying to access my DynamoDB table with the following code:
use Aws\DynamoDb\DynamoDbClient;
try {
$client = DynamoDbClient::factory(array(
'profile' => 'default', // access ID + secret are in the .aws/credentials file
'region' => Region::EU_WEST_1 // also tried with "eu-west-1"
));
echo "after client instanciation"; // this is not displayed
$response = $client->getItem([
'TableName' => 'Child',
'Key' => [
'ChildID' => 'Nicolas'
]
]);
print_r ($response['Item']);
} catch (Exception $e) {
echo '<p>Exception received : ', $e->getMessage(), "\n</p>";
}
I'm not getting any exception. The child I'm trying to get isn't displayed (I did create it). Also tried with the putItem method but it didn't add anything to the DB.
Exception received : ', $e->getMessage(), "\n
"; } Still no exception. – Alexandre Raffin Oct 22 '15 at 08:52