Easy to use S3 services of Amazon AWS
composer require tbetool/aws-s3-service-php
$s3Service = new S3Service(S3_KEY, S3_SECRET, S3_BUCKET);
$s3Service->setS3Region('us-east-1');
$s3Service->setS3Version('latest');
$s3Service->setS3HttpVerify(false);
try {
$s3_url = $s3Service->moveToS3($local_file, $key, $acl);
return $s3_url;
} catch (Exception $e) {
print($e->getMessage();
}