Closed audunru closed 10 months ago
If you are using the built-in PHP server (php artisan serve
or php -S ...
) you may need to restart the server for the changes in your .env
to work.
After adding credentials in the .env file, don’t forget to run the
php artisan config:clear
command
php artisan cdn:push now throws an exception:
[Aws\Exception\CredentialsException]
Error retrieving credentials from the instance profile metadata server. (cURL error 28: (see http://curl.haxx.se/libcurl/c/libcurl-errors.html))
My .env file looks like this:
AWS_ACCESS_KEY_ID=blabla AWS_SECRET_ACCESS_KEY=blabla
To fix the exception, I had to create ~/.aws/credentials:
[default] aws_access_key_id = blabla aws_secret_access_key = blabla
Now cdn:push works again, but I'd prefer if I could just use the .env file like I used to.
The only thing I can think of that has changed is composer update upgraded aws/aws-sdk-php from 3.19.10 to 3.19.12. Downgrading to 3.19.10 still throws the same exception, so I don't know what happened.