title: AWS S3 getSignedUrl constructs wrong URL
body: <p>I want to get a pre-signed URL for my S3 bucket for a PUT request like this (in node.js)</p>
  
  <pre><code>   AWS.config.update({
        accessKeyId: s3Config.accessKeyId,
        secretAccessKey: s3Config.secretAccessKey,
        region: s3Config.region,
        signatureVersion: 'v4'
     });
     var s3bucket = new AWS.S3({params: {Bucket: s3Config.bucket,Key:'/content'}});
     s3Config.preSignedURL = s3bucket.getSignedUrl('putObject',{ACL:s3Config.acl})
  </code></pre>
  
  <p>as a result i get</p>
  
  <p><a href="https://[BUCKET].s3.[REGION].amazonaws.com/[KEY]?[presignedURLStuff]" rel="nofollow">https://[BUCKET].s3.[REGION].amazonaws.com/[KEY]?[presignedURLStuff]</a></p>
  
  <p>This URL is according to Amazon wrong. The URL has to be in the format <a href="http://*.s3.amazonaws.com/*" rel="nofollow">http://*.s3.amazonaws.com/*</a>. I also get the Error net::ERR_INSECURE_RESPONSE from the pre-flight. What do I have to do that the function constructs the right URL. Removing the region from the URL leads to 400 Bad Request. Pre-flight OPTIONS works then.</p>