Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[exporter/awskinesis] use cached credentials provider (#32415)
**Description:** Wraps the `AssumeRoleProvider` in a `CachedCredentials` provider, in the case the AWS role is explicitly specified in the configuration. This prevents a role assumption from happening every API call. This was causing us to get rate limited by AWS STS since it was not caching credentials. The previous configuration basically fulfills the scenario described in the AWS [Go SDK V2 docs](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specify-credentials-programmatically): > All credential providers passed to or returned by LoadDefaultConfig are wrapped in a [CredentialsCache](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#CredentialsCache) automatically. This enables caching and concurrency safe credential access. If you explicitly configure a provider on aws.Config directly you must explicitly wrap the provider with this type using [NewCredentialsCache](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#NewCredentialsCache). **Link to tracking Issue:** N/A **Testing:** N/A
- Loading branch information