Skip to content

Commit

Permalink
Fix issue 52
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanaubert committed Feb 26, 2016
1 parent e7389d9 commit c755ee3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
23 changes: 8 additions & 15 deletions AmazonWebServices.php
Expand Up @@ -35,24 +35,17 @@ public function __construct($config = array())
{
$this->configs = $config;

// create a new aws credentials provider

$credentials = new Credentials($this->getKey(), $this->getSecret());

// it's more bette to use Credentials provide.
// possibility to use memorize function which will cache your credentials
// and optimize performances

$this->sdk = new Sdk(
array(
'region' => $this->getRegion(),
// use specific aws sdk php version or latest version if not defined
'version' => ($this->getVersion() != '' ) ? $this->getVersion() : 'latest',
'credentials' => $credentials
)
$options = array(
'region' => $this->getRegion(),
// use specific aws sdk php version or latest version if not defined
'version' => ($this->getVersion() !== '') ? $this->getVersion() : 'latest',
);

if ($this->getKey() !== '' && $this->getSecret() !== '') {
$options['credentials'] = new Credentials($this->getKey(), $this->getSecret());
}

$this->sdk = new Sdk($options);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/todo.md
Expand Up @@ -24,7 +24,7 @@
$credentials = new Credentials($this->getKey(), $this->getSecret());
// it's more bette to use Credentials provide.
// it's more better to use Credentials provide.
// possibility to use memorize function which will cache your credentials
// and optimize performances
Expand Down

0 comments on commit c755ee3

Please sign in to comment.