title: How can I call AssumeRoleWithWebIdentity to access Amazon DynamoDB?
body: <p>Scenario:<br>
  I create an app on Amazon, and use <a href="http://login.amazon.com/" rel="nofollow">Login with Amazon</a>, which returns an "access_token". Then I run:</p>
  
  <pre class="lang-js prettyprint-override"><code>  AWS.config.credentials = new AWS.WebIdentityCredentials({
  
            RoleArn: 'arn:aws:iam::416942672???:role/???_amazon_role',
            ProviderId: 'www.amazon.com',
            WebIdentityToken:"?????????"
          });
  
    AWS.config.region = 'us-west-2';
  
    dynamodb =  new  AWS.DynamoDB()   dynamodb.listTables({}, function a(error,data){
  
      alert( "error: " +  JSON.stringify(error) );
      alert( JSON.stringify(data) );
      });
  </code></pre>
  
  <p>When I later run the <code>ListTable</code> function it will return:</p>
  
  <pre><code>error: {"message":"Missing credentials in config","code":"SigningError","name":"SigningError","statusCode":403,"retryable":false}
  </code></pre>
  
  <p>I found  it  seems that I have  to  call <code>AssumeRoleWithWebIdentity</code>. But how  can I  call it  in <a href="http://aws.amazon.com/sdkfornodejs/" rel="nofollow">AWS SDK for JavaScript</a>? Or is there any other process I missed?</p>