/**
  * Attempt to get new credentials from the instance profile
  *
  * @throws InstanceProfileCredentialsException On error
  */
 protected function refresh()
 {
     $credentials = $this->client->getInstanceProfileCredentials();
     // Expire the token 30 minutes early to pre-fetch before expiring.
     $this->credentials->setAccessKeyId($credentials->getAccessKeyId())->setSecretKey($credentials->getSecretKey())->setSecurityToken($credentials->getSecurityToken())->setExpiration($credentials->getExpiration() - 1800);
 }
 /**
  * Attempt to get new credentials from the instance profile
  *
  * @throws InstanceProfileCredentialsException On error
  */
 protected function refresh()
 {
     $credentials = $this->client->getInstanceProfileCredentials();
     // Expire the token 1 minute before it actually expires to pre-fetch before expiring
     $this->credentials->setAccessKeyId($credentials->getAccessKeyId())->setSecretKey($credentials->getSecretKey())->setSecurityToken($credentials->getSecurityToken())->setExpiration($credentials->getExpiration());
 }
 /**
  * Attempt to get new credentials from the instance profile
  *
  * @throws InstanceProfileCredentialsException On error
  */
 protected function refresh()
 {
     $credentials = $this->client->getInstanceProfileCredentials();
     $this->credentials->setAccessKeyId($credentials->getAccessKeyId())->setSecretKey($credentials->getSecretKey())->setSecurityToken($credentials->getSecurityToken())->setExpiration($credentials->getExpiration());
 }