I have saved a file in amazon s3 bucked as a private file now I want to download this file. I am using amazon s3 PHP component
my download function is as below but I am getting exception [403] Unexpected HTTP status
function downloadPrivateFile($bucket, $fileUrl) {
$obj = new S3($this->keyId, $this->secretKey);
echo $obj->getObjectInfo($bucket, $fileUrl);
}
Can anyone please help me how to download a private file.