I have a table called products with primary key Id
. I want to select all items in the table. This is the code is I'm using:
$batch_get_response = $dynamodb->batch_get_item(array(
'RequestItems' => array(
'products' => array(
'Keys' => array(
array( // Key #1
'HashKeyElement' => array( AmazonDynamoDB::TYPE_NUMBER => '1'),
'RangeKeyElement' => array( AmazonDynamoDB::TYPE_NUMBER => $current_time),
),
array( // Key #2
'HashKeyElement' => array( AmazonDynamoDB::TYPE_NUMBER => '2'),
'RangeKeyElement' => array( AmazonDynamoDB::TYPE_NUMBER => $current_time),
),
)
)
)
));
Is it possible to select all items without specifying the primary key? I'm using the AWS SDK for PHP.