From d42fac5d7fff38e3f16e80ac7f7e64559023c0d4 Mon Sep 17 00:00:00 2001 From: vasyaxparfenov Date: Thu, 19 Oct 2023 15:44:54 +0300 Subject: [PATCH] fix: removed explicit profile setup for assume role Signed-off-by: vasyaxparfenov --- provider/provider.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/provider/provider.go b/provider/provider.go index ceeb0ce..1825490 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -419,12 +419,7 @@ func getClient(conf *ProviderConf) (*elastic7.Client, error) { func assumeRoleCredentials(region, roleARN, roleExternalID, profile string) *awscredentials.Credentials { sessOpts := awsSessionOptions(region) - if profile == "" { - sessOpts.Profile = "default" - } else { - sessOpts.Profile = profile - } - + sessOpts.Profile = profile sess := awssession.Must(awssession.NewSessionWithOptions(sessOpts)) stsClient := awssts.New(sess) assumeRoleProvider := &awsstscreds.AssumeRoleProvider{