The amazon php sdk is uploaded to site and the autoloader is included successfully. But I'm getting an error 500 with no further details. I believe I've isolated the issue to the instantiation of S3Client, as everything else works and if I comment out that it doens't give error 500. Code is as follows -
require $web_root.'/aws/aws-autoloader.php'; $keyname = "--keyname--"; $secret = "--secret key--"; use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; $s3 = new S3Client([ 'profile' => 'default', 'region' => 'us-east-1', 'version' => 'latest', 'credentials' => [ 'key' => $keyname, 'secret' => $secret, ], ]);
As found in the example php code here - https://docs.aws.amazon.com/AmazonS3/latest/dev/usingHLmpuPHP.html
Why is returning error 500?