GithubHelp home page GithubHelp logo

Comments (2)

jeskew avatar jeskew commented on August 17, 2024

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.

Zxurian avatar Zxurian commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.