Skip to content

Commit

Permalink
fix: removed explicit profile setup for assume role
Browse files Browse the repository at this point in the history
Signed-off-by: vasyaxparfenov <[email protected]>
  • Loading branch information
vasyaxparfenov committed Oct 19, 2023
1 parent f526e6f commit 63a3b59
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,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{
Expand Down

0 comments on commit 63a3b59

Please sign in to comment.