Add SDKOption for default Credentials Provider Chain #2814
Labels
feature-request
A feature should be added or improved.
needs-review
This issue or pull request needs review from a core team member.
p3
This is a minor priority issue
Describe the feature
Every service client accepts an
AwsCredentialsProviderChain
that determines how credentials are resolved. It should be possible to configure a default during SDK initialization.Use Case
STSProfileCredentialsProvider
does not exist in default chain [150]. In certain codebases, it would be much more code-efficient to configure the credentials provider chain during initialization as opposed to passing a chain to construction of every client object.Proposed Solution
CredentialsProviderChainOptions
struct toAws.h
's SDKOptionsInitSDK
, check for presence of this struct's closure. If it is present, call someSetDefaultCredentialsProviderChain
with the result of the closure. If it is not present, callSet...Chain
method withDefaultAWSCredentialsProviderChain
(current default)DefaultAWSCredentialsProviderChain
across clients withGetDefaultCredentialsProviderChain
(to resolve to configured value or pre-existingDefaultAWSCredentialsProviderChain
).Other Information
posting a PR right now
Acknowledgements
The text was updated successfully, but these errors were encountered: