title: cannot upload or get any file using AWS S3 using react native
body: <p>I used AWS S3 as file storage and i cannot upload or get any files from  bucket. here is my code and can someone please help me to fix this issue. i am getting <code>AWSS3Provider - error uploading AccessDenied: Access Denied</code></p>
  
  <p>Here is my code: </p>
  
  <pre><code>import React from 'react';
  import {SafeAreaView, Text, TouchableOpacity, View,} from 'react-native';
  import Amplify, {Storage} from 'aws-amplify';
  import {awsmobile} from "./aws-exports";
  
  Amplify.configure(awsmobile);
  
  class App extends React.Component {
      constructor(props) {
          super(props);
          this.state = {};
      }
  
      async callerFn() {
          try {
              let file = 'My upload text';
              let name = 'myFile.txt';
              const access = {level: "public"}; // note the access path
              await Storage.put(name, file, access);
          } catch (e) {
              console.log(e.message)
          }
      }
  
      render() {
          return (
              &lt;View&gt;
                  &lt;SafeAreaView&gt;
                      &lt;TouchableOpacity onPress={() =&gt; this.callerFn()}&gt;
                          &lt;Text&gt;Press to Upload&lt;/Text&gt;
                      &lt;/TouchableOpacity&gt;
                  &lt;/SafeAreaView&gt;
              &lt;/View&gt;
          );
      }
  }
  
  export default App;
  </code></pre>
  
  <p>I have granted all permissions for user i have used.
  and here is my bucket policy:</p>
  
  <pre><code>{
      "Id": "PolicyXXXXXXXXXXXXX",
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "StmtXXXXXXXXXXXXX",
          "Action": [
            "s3:*"
          ],
          "Effect": "Allow",
          "Resource": "arn:aws:s3:::experimental/*",
          "Principal": {
            "AWS": [
              "arn:aws:iam::XXXXXXXXXXXX:user/amplify-XXXXX"
            ]
          }
        }
      ]
    }
  </code></pre>