Skip to content

Commit

Permalink
Merge pull request #53 from jordanaubert/fix_issue_52
Browse files Browse the repository at this point in the history
Fix issue 52
  • Loading branch information
CodeIsLife authored and CodeIsLife committed Feb 29, 2016
2 parents e217a55 + c755ee3 commit 4469e44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
23 changes: 8 additions & 15 deletions AmazonWebServices.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 4469e44

Please sign in to comment.