I am using the latest PHP AWS SDK... I seem to be running into this problem in certain circumstances... for example:
require 'aws-autoloader.php';
use Aws\S3\S3Client;
$client = S3Client::factory(array(
'key' => <skey>,
'secret' => <secret>
));
$key = $_GET['key'];
try {
$client -> copyObject(array(
'ACL' => "private",
'Bucket' => "<bucket>",
'Key' => "{$key}-copy",
'CopySource' => "<bucket>/{$key}",
'ContentType' => "text/html",
'CacheControl' => "max-age=1, private",
'MetadataDirective' => "REPLACE"
));
} catch (Exception $e) {
echo json_encode($e->getMessage());
}
?>
Why am I getting this error, "The command must be prepared before retrieving the request?"
Nice blog post on AWS
RépondreSupprimerAWS Training in Chennai | AWS Training Institute in Chennai | Best AWS Training in Chennai | AWS Training Class in Chennai | AWS Training Center in Chennai