diff --git a/pkg/awsutil/session.go b/pkg/awsutil/session.go index 7674f7b0..5c7a0754 100644 --- a/pkg/awsutil/session.go +++ b/pkg/awsutil/session.go @@ -119,11 +119,11 @@ func (c *Credentials) rootSession() (*session.Session, error) { // if given a role to assume, overwrite the session credentials with assume role credentials if c.AssumeRoleArn != "" { sess.Config.Credentials = stscreds.NewCredentials(sess, c.AssumeRoleArn, func(p *stscreds.AssumeRoleProvider) { - if c.RoleSessionName == "" { + if c.RoleSessionName != "" { p.RoleSessionName = c.RoleSessionName } - if c.ExternalId == "" { + if c.ExternalId != "" { p.ExternalID = aws.String(c.ExternalId) } })