Skip to content

Support passing selected profile into DefaultAWSCredentialsProviderChain #3395

Open
@nicornk

Description

@nicornk

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 the AWS_PROFILE or AWS_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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions