Tismon Varghese
Tismon Varghese

Reputation: 381

AWS Credential error

I am trying to connect to AWS from my php application(Laravel). My intention is to use the AWS Media convert Service. Please see the code I have used.

$client = new MediaConvertClient([
    'profile' => 'default',
    'version' => '2017-08-29',
    'region' => 'us-west-1',
    'credentials' => [
        'key' => $key,
        'secret' => $secret,
    ],
]);

$URI = $client->getEndpoint();
$endpoints= $client->describeEndpoints();

This is the error I am getting.

Cannot read credentials from /.aws/credentials

Does anyone have an idea about how to resolve this issues?

Upvotes: 1

Views: 437

Answers (1)

Tismon Varghese
Tismon Varghese

Reputation: 381

Finally, I got the answer. Removing the below line helped me to read the credential from $key and $secret (which is defined in the configuration file)

'profile' => 'default',

Upvotes: 4

Related Questions