Title: Cloudfront Credential Errors
Last modified: February 21, 2022

---

# Cloudfront Credential Errors

 *  Resolved [arpitkr](https://wordpress.org/support/users/arpitkr/)
 * (@arpitkr)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/)
 * I recently setup W3 total cache and things have been relatively smooth, and the
   plugin has been great
 * I have setup Cloudfront pull as CDN
 * Today, I updated a few of my plugins and proceeded to empty local and CDN cache.
 * As soon as I tried to empty CDN, I got a fatal error. I went and checked the 
   logs, and this is what I saw
 *     ```
       PHP Fatal error:  Uncaught Error: Call to undefined function GuzzleHttp\Promise\promise_for() in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php:158
       Stack trace:
       #0 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(443): Aws\Credentials\CredentialProvider::fromCredentials(Object(Aws\Credentials\Credentials))
       #1 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(323): Aws\ClientResolver::_apply_credentials(Object(Aws\Credentials\Credentials), Array, Object(Aws\HandlerList))
       #2 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/AwsClient.php(199): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
       #3 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(43): Aws\AwsClient->__construct(Array)
       #4 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(68): W3TC\CdnEngine_Mirror_CloudFront->_init()
       #5 /v in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php on line 158
       ```
   
 * I logged into W3 dashboard to test Cloudfront credentials. The test fails with
   the following error
 *     ```
       [21-Feb-2022 07:05:20 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function GuzzleHttp\Promise\promise_for() in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php:158
       Stack trace:
       #0 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(443): Aws\Credentials\CredentialProvider::fromCredentials(Object(Aws\Credentials\Credentials))
       #1 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientResolver.php(323): Aws\ClientResolver::_apply_credentials(Object(Aws\Credentials\Credentials), Array, Object(Aws\HandlerList))
       #2 /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/AwsClient.php(199): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
       #3 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(43): Aws\AwsClient->__construct(Array)
       #4 /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Mirror_CloudFront.php(142): W3TC\CdnEngine_Mirror_CloudFront->_init()
       #5 / in /var/www/html/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php on line 158
       ```
   
 * Now I can verify that the credentials are in fact correct. And no other plugin
   I have uses these credentials. Can you please let me know how to proceed with
   this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcloudfront-credential-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15386498)
 * Hello [@arpitkr](https://wordpress.org/support/users/arpitkr/)
 * I am sorry about the issue you are experiencing and I am happy to assist you 
   with this.
    Can you please confirm that you are not using any other plugin that
   may be using the same AWS SDK library? Thanks!
 *  Thread Starter [arpitkr](https://wordpress.org/support/users/arpitkr/)
 * (@arpitkr)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15386611)
 * Thanks for the quick response Marko.
 * To the best of my knowledge, no. I haven’t explicitly used AWS credentials on
   any other plugin.
 * Having said that, I am not sure if there is any other plugin which is initialising
   the AWS SDK. Is there a way to find out?
 * EDIT: It seems Updraft does use the SDK. I am not sure if they initialise it 
   or not because I haven’t setup AWS credentials with Updraft
    -  This reply was modified 4 years, 3 months ago by [arpitkr](https://wordpress.org/support/users/arpitkr/).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15387413)
 * Hello [@arpitkr](https://wordpress.org/support/users/arpitkr/)
 * Thank you for the information.
    Can you please temporarily disable Updraft and
   see if the problem persists? Thanks!
 *  Thread Starter [arpitkr](https://wordpress.org/support/users/arpitkr/)
 * (@arpitkr)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15387758)
 * I just did, still getting the same error
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15387830)
 * Hello [@arpitkr](https://wordpress.org/support/users/arpitkr/)
 * Can you try to downgrade the W3TC version to 2.1.2. There could be a bug in the
   version of the Aws lib or a different class loaded by the autoloader due to another
   Aws lib loaded for another plugin as I’ve mentioned before.
    Thanks!
 *  Thread Starter [arpitkr](https://wordpress.org/support/users/arpitkr/)
 * (@arpitkr)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15388015)
 * Thanks Marco
    There was actually an issue with Google listing, which I had upgraded
   today. Right now, the Google listing is crashing at multiple places. I have disabled
   it for now. Let me speak with Listing support and see what to do about it.
 * Thanks for looking at it. We can close it. If I face issues after getting around
   Listing plugin, I will get back to you
 * Thanks once again
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15388046)
 * Hello [@arpitkr](https://wordpress.org/support/users/arpitkr/)
 * Thank you for the information.
    Let me know what you found. Thanks!
 *  Thread Starter [arpitkr](https://wordpress.org/support/users/arpitkr/)
 * (@arpitkr)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15389519)
 * Listing was crashing while initializing aws sdk which has something to do with
   Jetpack. What exactly, listing support would hopefully let me know
 * Interestingly enough, it seems that prevented even w3 total cache from initializing
   awe sdk
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15390713)
 * Hello [@arpitkr](https://wordpress.org/support/users/arpitkr/)
 * Thank you for sharing this as this may help users with similar issues.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Cloudfront Credential Errors’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/cloudfront-credential-errors/#post-15390713)
 * Status: resolved