From 1d56fe3da4a29afbd26cca025182b3484617f37a Mon Sep 17 00:00:00 2001 From: Ori Rawlings Date: Tue, 14 Jul 2020 01:31:49 -0500 Subject: [PATCH] Don't require AWS_ROLE_SESSION_NAME to sts:AssumeRoleWithWebIdentity (#9416) Fixes #9415 Co-authored-by: Theron Voran --- sdk/helper/awsutil/generate_credentials.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/helper/awsutil/generate_credentials.go b/sdk/helper/awsutil/generate_credentials.go index b4bdcc6a9f62..66c599a88e71 100644 --- a/sdk/helper/awsutil/generate_credentials.go +++ b/sdk/helper/awsutil/generate_credentials.go @@ -62,7 +62,7 @@ func (c *CredentialsConfig) GenerateCredentialChain() (*credentials.Credentials, roleARN := os.Getenv("AWS_ROLE_ARN") tokenPath := os.Getenv("AWS_WEB_IDENTITY_TOKEN_FILE") sessionName := os.Getenv("AWS_ROLE_SESSION_NAME") - if roleARN != "" && tokenPath != "" && sessionName != "" { + if roleARN != "" && tokenPath != "" { // this session is only created to create the WebIdentityRoleProvider, as the env variables are already there // this automatically assumes the role, but the provider needs to be added to the chain sess, err := session.NewSession()