title: AWS-Amplify: Unauthenticated access is not supported for this identity pool
body: <p>I'm using: <a href="https://github.com/aws-amplify/amplify-js" rel="noreferrer">https://github.com/aws-amplify/amplify-js</a></p>
  
  <p>Is there any working example how to use authenticated access to AWS? I'm using this:</p>
  
  <pre><code>Amplify.configure({
          Auth: {
              identityPoolId: configs.broker.identityPoolId,
              region: configs.broker.aws_pubsub_region,
              userPoolId: configs.broker.userPoolId,
              userPoolWebClientId: configs.broker.userPoolWebClientId,
          }
  });
  
  Amplify.addPluggable(new AWSIoTProvider(configs.broker));
  
  Auth.signIn(configs.broker.username, configs.broker.password)
      .then(user =&gt; {                
          resolve({ code: 200, message: 'Authorized access to AWS is used' })
      })
      .catch(singInErr =&gt; resolve({ code: 500, message: singInErr.message }));
  </code></pre>
  
  <p>And if it is OK (it is ok):</p>
  
  <pre><code>    PubSub.publish(configs.broker.topic, JSON.stringify(data))
           .then(res =&gt; resolve({
                code: 200,
                message: 'OK'
           }))
           .catch(err =&gt; resolve({
                code: 500,
                message: err.toString()
           }));
  </code></pre>
  
  <p>But I keep getting:</p>
  
  <p>[Unhandled promise rejection: NotAuthorizedException: Unauthenticated access is not supported for this identity pool.]</p>