php s3 api upgrade in AWS Elastic Beanstalk application - peoplequiz.com

Job ID: 33716668

Budget: $30 – $250 USD

I have upgraded an elastic beanstalk website and I need to get the aws s3 api for PHP working again for image upload. This is just one file that is a couple pages long. trying to replace aws-sdk with aws-sdk3 (autoloader.php). You can see where I've attempted to replacethe old command :
$upload = $s3->upload($bucket, $apath, fopen($_FILES['userfile']['tmp_name'], 'rb'), 'public-read');
with the new:
$result = $client->putObject([
'Bucket' => $bucket,
'Key' => $apath,
'SourceFile' => $file_source_stream,
'ACL' => 'public-read',

I'm getting no errors that I can see, and code dies on the putObject. catch block not executing.
Couldn't figure out how to get the composer version installed to try that.