title: How to upload to AWS S3 directly from browser using a pre-signed URL instead of credentials?
body: <p>We'd like to use Javascript AWS SDK to upload files to S3, but without using credentials at all.
  Uploading using credentials works, but we cannot generate an AWS IAM user for each of our app users (or should we?)</p>
  
  <p>Therefore, similar to using GET, we'd like the server to generate a pre-signed URL, send it to browser, and have the browser upload to that URL. </p>
  
  <p>However, there are no examples on how to accomplish this.
  Also, if not setting a credential, even before making the upload to S3 request, the SDK errors with</p>
  
  <pre><code>code: "CredentialsError"
  message: "No credentials to load"
  </code></pre>
  
  <p>The JS SDK docs mention this, so it seems it would be possible:</p>
  
  <pre><code>Pre-signing a putObject (asynchronously)
  var params = {Bucket: 'bucket', Key: 'key'};
      s3.getSignedUrl('putObject', params, function (err, url) {
        console.log('The URL is', url);
  });
  </code></pre>