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

[request]: Make it easier to re-use shared config with some minor tweaks

Open jdisanti opened this issue 3 years ago • 2 comments
trafficstars

Tell us about your request

aws_config::Config should have a to_builder() or Builder::from(config) so that a single field on the config can be easily swapped out rather than creating a builder and copying every field over one by one from the other config.

Tell us about the problem you're trying to solve.

Say I have a config, but I want to change the credentials provider for another use-case. There should be a way to just change that credential provider rather than having to create a new Config::Builder and copy every field over.

Are you currently working around this issue?

Working around by using a builder and copying over every field.

Additional context

No response

jdisanti avatar Dec 13 '21 23:12 jdisanti

Would this also be solved if the have Clone?

Am working on a PR in smithy-rs

https://github.com/awslabs/smithy-rs/pull/985

Jacco avatar Dec 16 '21 10:12 Jacco

this is a little different. This refers to aws_types::Config, a handwritten struct. Once you have a Config, it is immutable which makes altering it a little cumbersome. (the smithy-rs#985 impacts generated builders)

rcoh avatar Dec 16 '21 15:12 rcoh

This is now supported (doc)

ysaito1001 avatar May 24 '24 17:05 ysaito1001

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 May 24 '24 17:05 github-actions[bot]