3
votes

I'm using the latest AWS SDK for PHP 2. There are 2 different pages for the DynamoDB documentation

Latest DynamoDB

DynamoDB before 2011-12-05

Even though I'm using the Latest SDK it's behaving like the "DynamoDB before 2011-12-05". Here's the code I'm using which is resulting in the error "Error Type: client, AWS Error Message: Supplied AttributeValue is empty, must contain exactly one of the supported datatypes"

$result = $client->getItem(array(
    'ConsistentRead' => true,
    'TableName' => 'responsys_users',
    'Key'       => array(
        'HashKeyElement' => array(
            'vendor_map_id' => array('N' => '1')
        )
    )
));

I can't find anything in the API specification or online that's helped solve the problem. Any help would be appreciated!

1
seems that you have two keys in the table, while only one is provided in the requestyegor256
Found out the problem. I need to implicitly give the latest version for the AWS SDK to use the latest version (and unexpected behavior). So i had to set the 'apiVersion' to '2012-08-10' when creating the client otherwise it the latest SDK uses an earlier version of the DynamoDB clientjadent

1 Answers

1
votes

You have to lock in the version date on instantiation to use the latest. I believe 2012-08-10 is the latest version.