0

I am using the AWS SDK for PHP to send email via SES. I have a PHP file that i use to send email. When i use the AWS Command Line Interface (AWS CLI) to run this file I can send email. However, when i try it from the browser I get a http 500 error. Please can someone advise?

I am getting the following trace: The 'autoload.php' file is not located in the /html folder. How can I allow this to be opened? This file has read access opened for the public.

 Fatal error: Uncaught Aws\Exception\CredentialsException: Error retrieving credentials from the instance profile metadata server. (Client error: `GET http://169.254.169.254/latest/meta-data/iam/security-credentials/` resulted in a `404 Not Found` response: <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "htt (truncated...) ) in /home/ec2-user/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php:79 Stack trace: #0 /home/ec2-user/vendor/guzzlehttp/promises/src/Promise.php(203): Aws\Credentials\InstanceProfileProvider->Aws\Credentials\{closure}(Object(GuzzleHttp\Exception\ClientException)) #1 /home/ec2-user/vendor/guzzlehttp/promises/src/Promise.php(156): GuzzleHttp\Promise\Promise::callHandler(2, Array, Array) #2 /home/ec2-user/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #3 /home/ec2-user/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php(96): GuzzleHttp\Promise\TaskQueue- in /home/ec2-user/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php on line 79
jamesMcKey
  • 481
  • 5
  • 28

0 Answers0