title: Setting metadata on S3 multipart upload
body: <p>I'd like to upload a file to S3 in parts, and set some metadata on the file. I'm using boto to interact with S3. I'm able to set metadata with single-operation uploads like so:</p>
  
  <p>Is there a way to set metadata with a multipart upload? I've tried <a href="https://stackoverflow.com/questions/4754383/how-to-change-metadata-on-an-object-in-amazon-s3">this method</a> of copying the key to change the metadata, but it fails with the error: <code>InvalidRequest: The specified copy source is larger than the maximum allowable size for a copy source: &lt;size&gt;</code></p>
  
  <p>I've also tried doing the following:</p>
  
  <pre><code>key = bucket.create_key(key_name)
  key.set_metadata('some-key', 'value')
  &lt;multipart upload&gt;
  </code></pre>
  
  <p>...but the multipart upload overwrites the metadata.</p>
  
  <p>I'm using code <a href="https://bcbio.wordpress.com/2011/04/10/parallel-upload-to-amazon-s3-with-python-boto-and-multiprocessing/" rel="nofollow noreferrer">similar to this</a> to do the multipart upload.</p>