Skip to content

Commit

Permalink
Fix bug in Get-ATIAMSessionCredentials with IAM::User creds
Browse files Browse the repository at this point in the history
  • Loading branch information
fireflycons committed Jan 18, 2020
1 parent f9058fd commit c1aa800
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Release Notes

## 0.17.0
## 0.17.3

* Bug fix in `Get-ATIAMSessionCredentials` where a null object reference exception is thrown if converting IAM::User credentials

## 0.17.2

* Create a mechanism to cache external credeentials so that this module is not reloaded for every invocation of AWS CLI resulting in poor performance

## 0.17.1

* Add `-AwsCli` switch to `Get-ATIAMSessionCredentials` to output in external credential format for AWS CLI
* Add `Set-ATIAMCliExternalCredentials` cmdlet to insert aws-toolbox as an external credential process for supplying SAML credentials to AWS CLI
Expand Down
3 changes: 2 additions & 1 deletion aws-toolbox/Public/IAM/Get-ATIAMSessionCredentials.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ function Get-ATIAMSessionCredentials

$cred = Get-StoredAwsCredentials

if (-not $AwsCli)
if (-not $AwsCli -and $cred.UseToken)
{
# aws-cli should renew the keys when it needs to
# Also if not UseToken, these are IAM::User creds and don't expire
Write-Warning "Expiry time for these keys: $($cred.Expires.ToLocalTime().ToString("HH:mm:ss")). You will need to re-run this script after then to regenerate keys."
}

Expand Down

0 comments on commit c1aa800

Please sign in to comment.