aws-sdk-php: Default credential provider failing to resolve

I am using the defaultProvider to sign an elastic search request but a recent update to the SDK or guzzle has caused it to to start failing.

I have isolated the problem to the chaining going on in the default provider, it seems that if the last item in the chain fails the whole request fails with the following error.

The promise was rejected with reason: Invoking the wait callback did not resolve the promise

I am using the role based credentials (instanceProfile) but if that option appears last as it does with the default provider the request fails, if I reverse the last two options the promise resolves

This Fails

$provider = CredentialProvider::chain(CredentialProvider::env(), CredentialProvider::ini(), CredentialProvider::instanceProfile(), CredentialProvider::ecsCredentials());
call_user_func($provider)->wait();

This returns a credentials object

$provider = CredentialProvider::chain(CredentialProvider::env(), CredentialProvider::ini(), CredentialProvider::ecsCredentials(), CredentialProvider::instanceProfile());
call_user_func($provider)->wait();

Has anyone encountered this or knows why it’s happening?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 31 (11 by maintainers)

Most upvoted comments

https://github.com/guzzle/promises/releases/tag/v1.3.1 is out containing a fix (confirmed in the reproduction environment)

Hi guys!

We are waiting for a final review before merging and tagging 1.3.1 with a fix. I will keep you posted.

I was able to reproduce the issue: https://github.com/reproduce/guzzle/tree/issue1668

After a quick look in the code: the way how coroutines are handled has been changed in 1.3.0, which might be the guilty one.