Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
fix: return creds for assumed role (#186)
Browse files Browse the repository at this point in the history
do not shadow outer creds

fixes #182
  • Loading branch information
yhlee-tw authored and nickatsegment committed Jul 25, 2019
1 parent bfe0916 commit ef33dc6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ func (p *Provider) Retrieve() (credentials.Value, error) {
// roles directly.
if p.profile != source {
if role, ok := p.profiles[p.profile]["role_arn"]; ok {
creds, err := p.assumeRoleFromSession(creds, role)
var err error
creds, err = p.assumeRoleFromSession(creds, role)
if err != nil {
return credentials.Value{}, err
}
Expand Down

0 comments on commit ef33dc6

Please sign in to comment.