Tag Archives: sdk

Uncaught exception ‘CFCredentials_Exception’ with message ‘No credentials were provided. [solved]

If you’re using the Amazon Web Services (AWS) SDK (Software Developer Kit) version 1.5 “Allegro” for PHP you may have noticed an error like: Fatal error: Uncaught exception ‘CFCredentials_Exception’ with message ‘No credentials were provided. The SDK attempts to retrieve Instance Profile credentials from the EC2 Instance Metadata Service, but doing this requires the “default_cache_config” option to be set in the config.inc.php file or constructor. In order to cache the retrieved credentials.’ in #0 amazon-php-sdk/sdk- Stack trace: amazon-php-sdk/sdk- CFRuntime->__construct(Array) #1 amazon-php-sdk/sdk- AmazonEC2->__construct() #2 {main} thrown in amazon-php-sdk/sdk- on line 439 My solution was fairly simple – the PHP SDK download has a config-sample.inc.php file that you can copy to config.inc.php and then add your AWS key and secret key. After doing that you should be good to go.

Posted in Server Administration, Software, Tech Tips, Web Development | Tagged , , , | 2 Comments