public function __invoke()
 {
     return Promise\coroutine(function () {
         $params = $this->logins ? ['Logins' => $this->logins] : [];
         $getIdParams = $params + ['IdentityPoolId' => $this->identityPoolId];
         if ($this->accountId) {
             $getIdParams['AccountId'] = $this->accountId;
         }
         $id = (yield $this->client->getId($getIdParams));
         $result = (yield $this->client->getCredentialsForIdentity(['IdentityId' => $id['IdentityId']] + $params));
         (yield new Credentials($result['Credentials']['AccessKeyId'], $result['Credentials']['SecretKey'], $result['Credentials']['SessionToken'], (int) $result['Credentials']['Expiration']->format('U')));
     });
 }