amazon web services - AWS Iam commands, Working correct in terminal and not working in Laravel/PHP AWS SDK -


i using os: ubuntu 14.04 , installed awscli package using terminal. while running aws iam commands, working fine.

eg: ran command aws iam list-users , got following results

{     "users": [         {             "arn": "arn:aws:iam::3**16****332:user/xyz",             "createdate": "2014-09-29t14:21:25z",             "userid": "aidajy*******mw**w",             "path": "/",             "username": "xyz"         },         {             "arn": "arn:aws:iam::34****044**2:user/abcxyz",             "createdate": "2014-02-07t21:08:53z",             "userid": "aidaj******jml**v6y",             "path": "/",             "username": "abcxyz"         }, } 

while using aws sdk laravel 5.1, configure key, secrect, region etc (same configured in awscli package)

while running code in laravel 5.1

$iam    =   \app::make('aws')->createclient('iam'); $result =   $iam->listusers();  echo "<pre>";   print_r($result); die(); 

getting following error(see attachment). enter image description here

what can reason because same configuration working fine in terminal not sdk. tried sqs, working fine see following code.

$obj    =   \app::make('aws')->createclient('sqs'); $queue  =   $obj->getqueueurl(['queuename'=>'sms-demo']); $queueurl=   $queue->get('queueurl');  $result = $obj->receivemessage(                 array('queueurl'=> $queueurl)); 

iam global service , not region specific. when using api must use us-east-1 region call.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -