aws-sdk-rust icon indicating copy to clipboard operation
aws-sdk-rust copied to clipboard

[request]: Please add support for overriding profile file paths

Open bdonlan opened this issue 4 years ago • 3 comments
trafficstars

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue, please leave a comment

Tell us about your request Please add an option to ProfileFileCredentialsProvider to load credentials from a nonstandard path.

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Certain credential deployment systems work by placing credentials in a well-known path. Currently it is not possible to parse these credentials using the AWS SDK for rust, because it is not possible to override the profile path.

The rustdoc suggests aws_config::profile::load could be used to override this, but the rustdoc for this method does not provide a clear path to doing so (indeed, the Fs and Env arguments are not even rustdoc'd). When all you need is to load credentials, that's a lot more complexity than you'd need.

Are you currently working around this issue? I am using rusoto to parse the profile and writing a custom ProvideCredentials to translate this to the Aws SDK credentials.

bdonlan avatar Sep 29 '21 23:09 bdonlan

I think this would be a reasonable feature. Did you see this section: https://awslabs.github.io/aws-sdk-rust/aws_config/profile/fn.load.html#location-of-profile-files?

The location of the config file will be loaded from the AWS_CONFIG_FILE environment variable with a fallback to ~/.aws/config The location of the credentials file will be loaded from the AWS_SHARED_CREDENTIALS_FILE environment variable with a fallback to ~/.aws/credentials

But for some environments, I imagine that those variables aren't practical to set

rcoh avatar Sep 30 '21 14:09 rcoh

Filed https://github.com/awslabs/smithy-rs/issues/733 to track / prioritize fixing the docs.

rcoh avatar Sep 30 '21 14:09 rcoh

I did see that section, for my use case mutating global environment variables is not ideal.

bdonlan avatar Oct 29 '21 21:10 bdonlan

This feature was released in release-2022-10-26. The release notes have instructions on how to use it.

jdisanti avatar Oct 27 '22 23:10 jdisanti

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Oct 27 '22 23:10 github-actions[bot]