Hola buenas tardes estoy usando el SDK de aws y php pero me sale un error y no se como resolverlo agradecería mucho su ayuda gracias de antemano.
require '../../vendor/autoload.php';
use Aws\Rekognition\RekognitionClient;
$credentials = new Aws\Credentials\Credentials('*******', '******');
$rekognitionClient = RekognitionClient::factory(array(
'region' => 'us-east-2',
'version' => 'latest',
'credentials' => $credentials,
//'debug' => true,
));
$compareFaceResults= $rekognitionClient->compareFaces([
'SimilarityThreshold' => 80,
'SourceImage' => [
'Bytes' => file_get_contents("test.jpg")
],
'TargetImage' => [
'Bytes' => file_get_contents("test1.jpg")
],
]);
$FaceMatchesResult = $compareFaceResults['FaceMatches'];
$SimilarityResult = $FaceMatchesResult['Similarity']; //Here You will get similarity
$sourceImageFace = $compareFaceResults['SourceImageFace'];
$sourceConfidence = $sourceImageFace['Confidence']; //Here You will get confidence of the picture
'Error retrieving credentials from the instance profile metadata server. (cURL error 28: Connection timed out after 1000 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html))' in C:\xampp\vendor\aws\aws-sdk-php\src\Credentials\InstanceProfileProvider.php:88 Stack trace: #0 C:\xampp\vendor\guzzlehttp\promises\src\Promise.php(203): Aws\Credentials\InstanceProfileProvider->Aws\Credentials{closure}(Array) #1 C:\xampp\vendor\guzzlehttp\promises\src\Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(2, Array, Array) #2 C:\xampp\vendor\guzzlehttp\promises\src\TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise{closure}() #3 C:\xampp\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(98): GuzzleHttp\Promise\TaskQueue->run() #4 C:\xampp\vendor\guzzlehttp\guzzle\src\Handler\CurlMultiHandler.php(125): GuzzleHttp\Handler\CurlMultiHandler->tick() #5 C:\xampp\vendor\guzzlehttp\promises\src\Promise.php(246): Gu in C:\xampp\vendor\aws\aws-sdk-php\src\Credentials\InstanceProfileProvider.php on line 88