title: Storing AWS credentials in the frontend
body: <p>I am trying to get hold of my image objects from S3, from my JavaScript frontend application.</p>
  
  <p>Acording to the documentation, these are the steps required:</p>
  
  <pre><code>import * as AWS from "aws-sdk";
  
  AWS.config.update({accesKeyId, secretAccesKey, region});
  
  let s3 = new AWS.S3();
  </code></pre>
  
  <p>And then, you can get the objects like so:</p>
  
  <pre><code>function listObjects(bucketName, folderName) {
    return new Promise((resolve) =&gt; {
      s3.listObjects({Bucket: bucketName, Prefix: folderName}).promise()
        .then((data) =&gt; {
          resolve(data.Contents);
        })
    });
  }
  </code></pre>
  
  <p>All seems to work correctly, but what worries me is that I also need to keep the accessKeyId and the secretAccessKey in my frontend application, in order to access the bucket.</p>
  
  <p>How does one secure the bucket, or access the objects without providing these confidential data?</p>