apache - PHP Fatal Error using AWS PHP SDK - Call to undefined method Guzzle\\Http\\Message\\Request::batchWriteItem() -


i've lamp server on aws ec2 , i've installed aws sdk php 2 using composer, instructed here.

i'm trying run sample query insert items on dynamodb, following error on php:

php fatal error: call undefined method guzzle\http\message\request::batchwriteitem()

my code:

require "vendor/autoload.php";  use aws\dynamodb\dynamodbclient; use aws\common\enum\region;   // instantiate dynamodb client aws credentials $aws = dynamodbclient::factory(array(   'key'    => 'xxx',   'secret' => 'xxx',   'region' => region::us_west_2 ));  $client = $aws->get("dynamodb");  $tablename = "xxxx"; $response = $client->batchwriteitem(array( "requestitems" => array(     $tablename => array(         array(             "putrequest" => array(                 "item" => array(                     "ip"            => array(type::string => "203.203.203.22"),                     "apikey" => array(type::string => "jkhkjhskjhs"),                      "timestamp"       => array(type::string => time()),                     "postedby"      => array(type::string => "user b")                 )             )         )         ), ) )); 

ideas???

thanks!


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -