I am trying to upload a 30 GB file to Amazon S3 using the AWS PHP SDK.
require('../vendor/autoload.php');
$client = new Aws\S3\S3Client([
'version' => 'latest',
'region' => 'us-east-1'
]);
$bucket_name = 'My-new-bucket';
$file_name = 'S3_www_1443369605.zip';
try {
$client->upload($bucket_name, $file_name, fopen($file_name, 'rb'), 'public-read');
echo "File has been uploaded";
} catch(Exception $e) {
echo "File upload error: $e";
}
It works for files up to 7GB. When uploading the 30 GB file I am getting the following error after the script has run for about 2 hours:
2015-09-28 23:48:22 - File upload error: exception 'Aws\Exception\MultipartUploadException' with message 'An exception occurred while uploading parts to a multipart upload. The following parts had errors: - Part 560: Error executing "UploadPart" on "http://ift.tt/1MWEJSA"; ...
Aucun commentaire:
Enregistrer un commentaire