title: Amazon S3 can not upload file via Cloudfront
body: <p>I want to upload a file to S3 via Cloudfront with signed URL. 
  HTTP PUT is allowed in Cloudfront Behavior.
  Bucket Policy</p>
  
  <blockquote>
  <pre><code>             {
          "Sid": "2",
          "Effect": "Allow",
          "Principal": {
              "AWS": "arn:aws:iam::cloudfront:user/CloudFront Origin Access Identity E1C2T5UJU07REZ"
          },
          "Action": [
              "s3:PutObject",
              "s3:PutObjectAcl",
              "s3:GetObject"
          ],
          "Resource": "arn:aws:s3:::testback/*"
      }
  </code></pre>
  </blockquote>
  
  <p>HTTP PUT  is allowed in CORS configuration.
  Cloudfront User also has read, writes permission.
  When I am trying upload file with signed URL.</p>
  
  <pre><code>curl -v -X PUT -F file=@hello.txt  http://my-host.cloudfront.net/hello.txt?Expires=1514764800&amp;Signature=MySig&amp;Key-Pair-Id=My-KeyPair
  </code></pre>
  
  <p>I've got an error:</p>
  
  <blockquote>
    <p><Code>InvalidRequest</Code>The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.  5D5DEF3D06F4583C8rBCpTUzYwm1ccc8IfkNtUnkuLxr3RZ2n7xn1j+VvP5dpG+3NMpHKPiNQ5tKpJjVliZ9UBI52vk=</p>
  </blockquote>
  
  <p>Log:</p>
  
  <blockquote>
    <p>2017-06-19      03:23:08        FRA54   726     My-IP  PUT<br>
    my-host.cloudfront.net   /hello.txt      400     -<br>
    curl/7.50.1<br>
    Expires=1514764800&amp;Signature=My-Sig&amp;Key-Pair-Id=My-KeyPair
    -       Error   MMHwKFzGuBzrlgP0yV71elcwEp2RVBAwJRJD1A5rO4Na6UmeKvcZPQ==<br>
    my-host.cloudfront.net   http    838     0.235   -  --<br>
    Error   HTTP/1.1</p>
  </blockquote>
  
  <p>Also, GET,DELETE works fine.</p>