amazon web services - The specified key does not exist - While copying S3 object from one bucket to another -
amazon web services - The specified key does not exist - While copying S3 object from one bucket to another -
i trying re-create s3 object 1 bucket , response looks -
object(stdclass)#24 (3) { ["error"]=> array(2) { ["code"]=> string(9) "nosuchkey" ["message"]=> string(33) "the specified key not exist." } ["code"]=> int(404) ["headers"]=> array(1) { ["type"]=> string(15) "application/xml" } }
here how code looks -
var_dump($this->s3->copyobject('bucket_1','bucket_1/'. images/1.jpg, 'bucket_2', 'bucket_2/images')).die();
according method signature of copyobject need supply source object uri , destination object uri.
anyone please help me know what's going wrong here ?
thanks.
finally fixed after few hours of looking amazon docs.
here s3 object keys -http://docs.aws.amazon.com/amazons3/latest/dev/usingmetadata.html#object-keys
as s3 flat file system, folders includes in keys,
$this->s3->copyobject('bucket_1','images/1.jpg, 'bucket_2', 'images/copy_of_2.jpg');
acl can passed 5th parameters.
amazon-web-services amazon-s3 amazon
Comments
Post a Comment