I installed AWS SDK along with Facebook and Google SDKs. All of them are working with no problem on my local MacOs environment. But once I pushed to our server all AWS clients are not working. FB and Google still working on production.
include_once(__DIR__ . "/../../../vendor/autoload.php");
use Aws\Rekognition\RekognitionClient;
use Aws\Sdk;
class RekognitionTest extends CI_Controller
{
private $client;
function __construct()
{
$sharedConfig = [
'version' => 'latest',
'region' => 'us-east-1',
'credentials' => [
'key' => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
'secret' => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
]
];
$sdk = new Sdk($sharedConfig);
$this->client = $sdk->createRekognition();
}
}
in the above code I am getting error:
PHP Fatal error: Class 'Aws\Sdk' not found
Also tried different ways to initiate the client using:
$this->client = new RekognitionClient([
'version' => 'latest',
'region' => 'us-east-1',
'credentials' => [
'key' => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
'secret' => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
]
]);
With the second way I am getting :
PHP Fatal error: Class 'Aws\Rekognition\RekognitionClient' not found
SDK version: "aws/aws-sdk-php": "^3.82"
I am not sure what I am doing wrong here.