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
Post a Comment