Support passing selected profile into DefaultAWSCredentialsProviderChain #3395
Labels
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
It would be great if as a user of the library it would be possible to pass the desired profile_name into the
DefaultAWSCredentialsProviderChain
. Right now, as a user I can only pass the selected profile by using theAWS_PROFILE
orAWS_DEFAULT_PROFILE
environment variable.In boto3 it's possible to pass the region_name into the Session and than the default "chain" will use it.
Use Case
duckdb could use the
DefaultAWSCredentialsProviderChain
together with a selected profile. Right now, there is duplicate code or more user facing configuration needed to make it work automatically.Sometimes setting environment variables is not possible.
duckdb/duckdb-aws#62
https://github.com/duckdb/duckdb-aws/blob/035c589a846b448d5c9cf3523ebfe439053a4406/src/aws_secret.cpp#L143
Proposed Solution
Have a new constructor in
DefaultAWSCredentialsProviderChain
that accepts a profile argument and pipe that value into all providers of the default chain.Other Information
Acknowledgements
The text was updated successfully, but these errors were encountered: