-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
copyObject()
is the only way I know of to update and exsting s3 object's metadata. When updating an object to add the Cache-Control
header I get the following error. I also tried adding 'Metadata'=>array('updated'=>'1')
but get same error:
This copy request is illegal because it is trying to copy an object to itself without changing the object's metadata, storage class, website redirect location or encryption attributes
Its simple to re-produce:
$s3->copyObject(array(
'Bucket' => 'mybucket',
'CopySource'=> 'mybucket/test.gz',
'Key' => 'test.gz',
'ACL' => CannedAcl::PUBLIC_READ,
'CacheControl' => "max-age=60, public",
'Metadata'=>array('updated'=>'1')
));
For what its worth, this bug also exists in the aws cli tool. see aws/aws-cli#652
bradisbell, misantronic, AntonZiminSaritasa and awesomelike
Metadata
Metadata
Assignees
Labels
No labels