title: How to get AWS credentials with a UserPools idToken?
body: <p>Im currently using a USER-POOLS authorizer to get the first 3 tokens for my API:</p>
  
  <ul>
  <li>idToken</li>
  <li>refreshToken</li>
  <li>accessToken</li>
  </ul>
  
  <p>From here I would like to request credentials to be able to SigV4 request to my already set up API gateway, but first I need to get the requested credentials in order to do the SigV4.</p>
  
  <p>In the docs I found this:</p>
  
  <pre><code>// Set the region where your identity pool exists (us-east-1, eu-west-1)
  AWSCognito.config.region = 'us-east-1';
  
  // Configure the credentials provider to use your identity pool
  AWSCognito.config.credentials = new AWSCognito.CognitoIdentityCredentials({
    IdentityPoolId: 'us-east-1:009xxxx ...',
  });
  
  // Make the call to obtain credentials
  AWSCognito.config.credentials.get(function(){
  
    // Credentials will be available when this function is called.
    var accessKeyId = AWSCognito.config.credentials.accessKeyId;
    var secretAccessKey = AWSCognito.config.credentials.secretAccessKey;
    var sessionToken = AWSCognito.config.credentials.sessionToken;
  
  });
  </code></pre>
  
  <p>To my surprise, the callback is called but the values for the 
  - accessKeyId
  - secretAccessKey
  - sessionToken
  are all null.</p>
  
  <p>I was expecting some kind of method, where I send my first idToken, and based on that I get the credentials, but it looks like this is all figured out under the hood?, anyways it is not working for me.</p>