I was using aws php sdk 2.0 in my yii framework application before. I have test, staging and production environment with different iam roles.
Now, when I use sdk 3 in DynamoDB, its giving me the error saying test_<domain>.php not found or staging_<domain>.php not found. Depending on instance IAM role. (test/staging)
I am using PHP 5.5.9. Following is the traceback.
Array
(
code => 500
type => PHP warning
message => include(test_project.php): failed to open stream: No such file or directory
file => /yii/framework/YiiBase.php
line => 432
trace => #0 /yii/framework/YiiBase.php(432): autoload()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(149): method_exists()
#4 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(111): GuzzleHttp\Promise\Promise->settle()
#5 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(201): GuzzleHttp\Promise\Promise->resolve()
#6 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(154): callHandler()
#7 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/TaskQueue.php(61): GuzzleHttp\Promise{closure}()
#8 /xxxxx/protected/extensions/aws/GuzzleHttp/Handler/CurlMultiHandler.php(96): GuzzleHttp\Promise\TaskQueue->run()
#9 /xxxxx/protected/extensions/aws/GuzzleHttp/Handler/CurlMultiHandler.php(123): GuzzleHttp\Handler\CurlMultiHandler->tick()
#10 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(242): GuzzleHttp\Handler\CurlMultiHandler->execute()
#11 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(219): GuzzleHttp\Promise\Promise->invokeWaitFn()
#12 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(262): GuzzleHttp\Promise\Promise->waitIfPending()
#13 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(221): GuzzleHttp\Promise\Promise->invokeWaitList()
#14 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(265): GuzzleHttp\Promise\Promise->waitIfPending()
#15 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(221): GuzzleHttp\Promise\Promise->invokeWaitList()
#16 /xxxxx/protected/extensions/aws/GuzzleHttp/Promise/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#17 /xxxxx/protected/extensions/aws/Aws/AwsClientTrait.php(59): GuzzleHttp\Promise\Promise->wait()
#18 /xxxxx/protected/extensions/aws/Aws/AwsClientTrait.php(78): Aws\DynamoDb\DynamoDbClient->execute()
#19 /xxxxx/protected/components/AwsDynamoDBBase.php(32): Aws\DynamoDb\DynamoDbClient->__call()
#20 /xxxxx/protected/components/AwsDynamoDBBase.php(32): Aws\DynamoDb\DynamoDbClient->query()
#21 /xxxxx/protected/components/AwsDynamoDB.php(643): AwsDynamoDB->query()
#22 /xxxxx/protected/controllers/ProfileController.php(31): AwsDynamoDB->get_dockets()
#23 /xxxxx/protected/controllers/ProfileController.php(13): ProfileController->test()
#24 /yii/framework/web/actions/CInlineAction.php(49): ProfileController->actionIndex()
#25 /yii/framework/web/CController.php(308): CInlineAction->runWithParams()
#26 /yii/framework/web/filters/CFilterChain.php(133): ProfileController->runAction()
#27 /yii/framework/web/filters/CFilter.php(40): CFilterChain->run()
#28 /yii/framework/web/filters/CFilterChain.php(130): AuthFilter->filter()
#29 /yii/framework/web/CController.php(291): CFilterChain->run()
#30 /yii/framework/web/CController.php(265): ProfileController->runActionWithFilters()
#31 /yii/framework/web/CWebApplication.php(282): ProfileController->run()
#32 /yii/framework/web/CWebApplication.php(141): CWebApplication->runController()
#33 /yii/framework/base/CApplication.php(185): CWebApplication->processRequest()
#34 /xxxxx/index.php(15): CWebApplication->run()
The trackback from 1-18 is raising this issue which goes to yii framework.
If I just run without any framework it runs fine.