title: Changing Meta data (last modified) on an S3 object
body: <p>I have to reorganize S3 objects -- basically move them around from one prefix to another.</p>
  
  <p>I do this by copying the original object from the source path to a target path.</p>
  
  <p>I would like to retain the original time stamps that are on the original object.</p>
  
  <p>I am using the Java sdk to perform this task.</p>
  
  <p>I am attempting to do this by:</p>
  
  <pre><code>        // Create a meta object to apply to the new object
          ObjectMetadata newObjectMetadata = new ObjectMetadata();
  
          // Next I set the lat mod date on the new meta object from the old object summary
          newObjectMetadata.setLastModified(Original_objectSummary.getLastModified());
  
          // Next I create a CopyObjectRequest
          CopyObjectRequest cor = new CopyObjectRequest(bucket, objectSummary.getKey(), bucket, targetKey);
  
          // Next I set the new object meta data on the copy request 
          cor.setNewObjectMetadata(newObjectMetadata);
  </code></pre>
  
  <p>However when the object is created it has the last modified date as seen in the AWS management console set to the date the new object was created.</p>
  
  <p>Any help or clarification appreciated.</p>
  
  <p>Thanks.</p>