I am trying to run a athena query using aws php sdk. However I am getting an empty array as a result. Can someone please point me on what's wrong with my code
require '/usr/bin/vendor/autoload.php';
use Aws\Athena\AthenaClient;
$options = [
'version' => 'latest',
'region' => 'eu-west-1',
'credentials' => [
'key' => 'mykey',
'secret' => 'mysecret']
];
$athenaClient = new Aws\Athena\AthenaClient($options);
$result = $athenaClient->startQueryExecution([
'QueryExecutionContext' => [
'Database' => 'mydbname',
],
'QueryString' => 'select * from mytable limit 3', // REQUIRED
'ResultConfiguration' => [ // REQUIRED
'EncryptionConfiguration' => [
'EncryptionOption' => 'SSE_S3' // REQUIRED
],
'OutputLocation' => 's3://mybucket/', // REQUIRED
],
]);
print_r($result);
Below is the result I am seeing
Aws\Result Object ( [data:Aws\Result:private] => Array ( [QueryExecutionId] => 21221212121212121 [@metadata] => Array ( [statusCode] => 200 [effectiveUri] => https://athena.eu-west-1.amazonaws.com [headers] => Array ( [date] => Tue, 28 Feb 2023 16:09:57 GMT [content-type] => application/x-amz-json-1.1 [content-length] => 59 [connection] => keep-alive [x-amzn-requestid] => 3232323232323232 ) [transferStats] => Array ( [http] => Array ( [0] => Array ( ) ) ) ) ) [monitoringEvents:Aws\Result:private] => Array ( ) )