title: How to upload large file to signed S3 URL from shell using curl
body: <p>I am using <em>curl</em> to upload a large file (>5GB) to a signed URL on S3.</p>
  
  <p>curl:</p>
  
  <pre><code>curl --request PUT \
    --url 'https://s3.amazonaws.com/my-bucket/file.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&amp;X-Amz-Credential=EMIRJN3IU7FNIXRK5JKQ%2F20170906%2Fus-east-1%2Fs3%2Faws4_request&amp;X-Amz-Date=20170906T070720Z&amp;X-Amz-Expires=100&amp;X-Amz-SignedHeaders=content-type%3Bhost&amp;x-amz-acl=public-read&amp;X-Amz-Signature=431a62c997c8202512996244b0267e83cb52c0c9d306376e15f43e22c07938f9' \
    --header 'content-type: application/x-zip-compressed' \
    --upload-file '/tmp/file.zip'
  </code></pre>
  
  <p>response:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Error&gt;
      &lt;Code&gt;EntityTooLarge&lt;/Code&gt;
      &lt;Message&gt;Your proposed upload exceeds the maximum allowed size&lt;/Message&gt;
      &lt;ProposedSize&gt;7192576000&lt;/ProposedSize&gt;
      &lt;MaxSizeAllowed&gt;5368709120&lt;/MaxSizeAllowed&gt;
      &lt;RequestId&gt;61803227A539E1F6&lt;/RequestId&gt;
      &lt;HostId&gt;75RCx1xBVCzVeBbof6GZRN0fAY9/tVTDUaavdXXXkNMVWPWLLhkvZx--MxjaalxlWuiuAg6qCA=&lt;/HostId&gt;
  &lt;/Error&gt;
  </code></pre>
  
  <p>This is due to <a href="http://docs.aws.amazon.com/AmazonS3/latest/dev/UploadingObjects.html" rel="nofollow noreferrer">AWS S3 forcing multipart upload for files larger than 5GB</a>.</p>
  
  <p>How can I perform multipart upload to signed URL on S3 using curl?</p>
  
  <p>If that's not possible, are there other tools. Note that this is a public upload, i.e. AWS CLI is not an option because the user running these uploads does not have our credentials.</p>