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 24, 2023
1 parent 2d6fae8 commit d42fac5
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 @@ -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{
Expand Down

0 comments on commit d42fac5

Please sign in to comment.