Comments (2)
Your second line should read $s3 = $aws->createS3();
or $s3 = $aws->createClient('S3');
when working with the currently release of this module. I updated the readme in e667eed.
from aws-sdk-php-zf2.
tried updating with your code provided, however now I'm getting the following exception:
InvalidArgumentException
File:
/var/www/dev.hub/vendor/aws/aws-sdk-php/src/ClientResolver.php:328
Message:
Missing required client configuration options:
version: (string)
A "version" configuration value is required. Specifying a version constraint
ensures that your code will not be affected by a breaking change made to the
service. For example, when using Amazon S3, you can lock your API version to
"2006-03-01".
Your build of the SDK has the following version(s) of "s3": * "2006-03-01"
You may provide "latest" to the "version" configuration value to utilize the
most recent available API version that your client's API provider can find.
Note: Using 'latest' in a production application is not recommended.
A list of available API versions can be found on each client's API documentation
page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are
unable to load a specific API version, then you may need to update your copy of
the SDK.
Stack trace:
#0 /var/www/dev.hub/vendor/aws/aws-sdk-php/src/ClientResolver.php(224): Aws\ClientResolver->throwRequired(Array)
#1 /var/www/dev.hub/vendor/aws/aws-sdk-php/src/AwsClient.php(137): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
#2 /var/www/dev.hub/vendor/aws/aws-sdk-php/src/S3/S3Client.php(62): Aws\AwsClient->__construct(Array)
#3 /var/www/dev.hub/vendor/aws/aws-sdk-php/src/Sdk.php(120): Aws\S3\S3Client->__construct(Array)
#4 /var/www/dev.hub/module/DataSystems/src/DataSystems/Controller/HooplaController.php(77): Aws\Sdk->createClient('S3')
#5 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(82): DataSystems\Controller\HooplaController->uploadAction()
#6 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
#7 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#8 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#9 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(118): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#10 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(93): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))
#11 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))
#12 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent))
#13 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#14 /var/www/dev.hub/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(314): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))
#15 /var/www/dev.hub/html/index.php(17): Zend\Mvc\Application->run()
#16 {main}
if I go back and add the version key to the aws.local.php then it works, so you may want to update the readme for that as well.
from aws-sdk-php-zf2.
Related Issues (20)
- Update composer.json with 3.* version of aws-sdk-php HOT 4
- problem serviceLocator S3RenameUpload HOT 4
- Generating incorrect upload URL HOT 2
- ServiceNotCreatedException HOT 1
- Error retrieving credentials from the instance profile metadata server. HOT 3
- PHP Fatal error - version 2.0.2 HOT 3
- Q: How to configure the part_size option (S3) HOT 2
- master branch is incompatible with ZF2 HOT 3
- $sm->get(DynamoDbSaveHandler::class); i got a error HOT 6
- ZF3 support HOT 3
- Zend Framework 3.0 support HOT 2
- Relax version constraint for zend-session in composer.json (php 7.2) HOT 1
- How would I use the s3link in a layout? HOT 8
- Release version 4.2 HOT 2
- v3 is not compatible with zendframework/zend-filter HOT 1
- Migrate to laminas HOT 2
- Hello HOT 2
- v4 is not compatible with zend-servicemanager ^2.7.0 HOT 3
- PHP 8 support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-php-zf2.