<?php
require 'phpaws/aws-autoloader.php';
   
   
use Aws\S3\S3Client;

// Instantiate
$s3 = new S3Client([
    'version' => 'latest',
    'region'  => 'eu-west-3',
	'credentials' => [
        'key'      => 'AKIAV5HPUDCKSD7S7VHW',
        'secret'   => '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',
    ]
]);

// Upload
try {
	$s3->putObject([
		'Bucket' => 'showcar-test',
		'Key'    => 'mytestfile.txt',
		'Body'   => fopen('./mytestfile.txt', 'r'),
		//'ACL'    => 'public-read',
	]);
} catch (Aws\S3\Exception\S3Exception $e) {
	echo "There was an error uploading the file.\n";
	echo "<pre>".print_r($e->getMessage(),true)."</pre>";
}

?>