Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assume_role_arn needs to be refactored #330

Open
leolorenzoluis opened this issue Jan 20, 2023 · 2 comments
Open

assume_role_arn needs to be refactored #330

leolorenzoluis opened this issue Jan 20, 2023 · 2 comments

Comments

@leolorenzoluis
Copy link

When multiple resources are created with assume_role_arn provided,then we hit the rate limit under provider.go

func assumeRoleCredentials(region, roleARN, profile string) *awscredentials.Credentials {
	sessOpts := awsSessionOptions(region)
	sessOpts.Profile = profile

	sess := awssession.Must(awssession.NewSessionWithOptions(sessOpts))
	stsClient := awssts.New(sess)
	assumeRoleProvider := &awsstscreds.AssumeRoleProvider{
		Client:  stsClient,
		RoleARN: roleARN,
	}

	return awscredentials.NewChainCredentials([]awscredentials.Provider{assumeRoleProvider})
}
@phillbaker
Copy link
Owner

@leolorenzoluis can you please include debug logs showing this? Can you clarify what rate limit you're hitting?

@leolorenzoluis
Copy link
Author

The debug logs will only show 400 http request that makes it look like it's coming from ElasticSearch but it's coming from STS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants