I was using aws/aws-sdk-php-zf2 1.2.* and had to upgrade to 2.0.* and the AWS SDK is v3 now.
Before I called it using the code:
$this->s3 = $serviceLocator->get('aws')->get('s3');
But now its returning this error:
Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for aws
Couldn't find the difference in the migration documentation.
Any tips?
I found an way that worked for me.
It's like that now:
use Aws\S3\S3Client;
$this->s3 = S3Client::factory(array(
'credentials' => array(
'key' => $this->config['aws']['key'],
'secret' => $this->config['aws']['secret'],
),
'region' => $this->config['aws']['region'],
'version' => '2006-03-01'
));