title: AWS Amplify, "Error: No credentials" when getting items from AppSync graphql API
body: <p>I've published my React application to amplify, everything went fine there. But when I open the amplify URL I see that no items have been fetched from database and I have an error in console saying &quot;No credentials&quot;</p>
  <p>I think the problem lies with the AppSync API somehow.
  I made it using the Amplify CLI, it uses API key authentication.</p>
  <p>Locally I provide credentials using the generated file <code>aws-exports.js</code>. I Import this in my <code>index.tsx</code> like so:</p>
  <pre><code>import awsmobile from &quot;./aws-exports&quot;;
  
  Amplify.configure(awsmobile);
  
  ReactDOM.render(
    &lt;React.StrictMode&gt;
      &lt;App /&gt;
    &lt;/React.StrictMode&gt;,
    document.getElementById('root')
  );
  </code></pre>
  <p>But this file is not pushed to git, so Amplify obviously doesn't have this from the repo. But I assumed that it was able to generate its own <code>aws-exports.js</code> file, as it doesn't give any errors on the import.</p>
  <p>So, what am I missing here? Do I have to use another method for authentication on my AppSync api or what is wrong here?
  Thanks!</p>