title: Amazon AWS SDK in Cakephp 3
body: <p>I'm trying to use the PHP AWS SDK in Cakephp 3. Before that, I followed the tutorial from Codecourse (in plain php) on youtube (<a href="https://www.youtube.com/watch?v=xkSIBeS_M7w" rel="nofollow">https://www.youtube.com/watch?v=xkSIBeS_M7w</a>). Everything worked fine and I could get along with the tutorial. </p>
  
  <p>For the Cakephp 3 project I used older code (<a href="http://www.bitsntricks.com/amazon-s3-services-cakephp/" rel="nofollow">http://www.bitsntricks.com/amazon-s3-services-cakephp/</a> link in step 1). Obviously, this Cakephp 2 code doesn't work out of the box in cakephp 3.  I'm fairly new to Cakephp and don't have a clue how to get this working (except that I need to adjust the code to V3 of AWS). My question is if somebody could give me any directions how to use AWS as a component in Cakephp 3? </p>
  
  <p>I installed the PHP AWS SDK with composer and it seems that it recognizes the dependency but I do get an empty object when I call the S3Client::Factory method in the constructor.</p>
  
  <p>Thanks in advance,<br>
  Mark</p>
  
  <p>Code from tutorial in Cakephp 2 in combination with AWS v3:</p>
  
  <pre><code>&lt;?php
   require 'aws/aws-autoloader.php';
   use Aws\Common\Exception\RuntimeException;
   use Aws\Common\Exception\MultipartUploadException;
   use Aws\S3\Model\MultipartUpload\UploadBuilder;
   use Aws\S3\S3Client;
  
   class AwsComponent  extends Component {
       public $bucket = '';
       private $s3 = null;
  
       public function __construct(){
  
           $this-&gt;s3 = S3Client::factory(array(
                        'key' =&gt; 'YOUR_API_KEY',
                        'secret' =&gt; 'YOUR_API_SECRET',
                        'region' =&gt; 'eu-west-1',
           ));
       }
   }
  </code></pre>