Vinelab / cdn

CDN Assets Manager Package for Laravel.
MIT License
216 stars 71 forks source link

Error retrieving credentials from the instance profile metadata server #100

Closed audunru closed 10 months ago

audunru commented 8 years ago

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.

Mulkave commented 7 years 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.

muhammad-naveed-brainx commented 1 year ago

After adding credentials in the .env file, don’t forget to run the php artisan config:clear command