Skip to content

Support synchronous load_defaults #1301

Open
@mattprodani

Description

@mattprodani

Describe the feature

Currently, aws_config::load_defaults(_); is asynchronous. This is a bit restrictive and makes setup code more complex, for example, implementing Default on a client wrapper isn't possible without an async getter.

Wondering if there are any clean options/plans for the future?

Use Case

Use Case:
aws_config::load_defaults() is async. This forces me to either:

  • Use async constructors everywhere (making simple initialization complex)
  • Resort to deprecated from_env() without behavior version support
  • Create awkward lazy initialization patterns
  • Can't use builder defaults

This makes it difficult to integrate AWS clients into structs that need to implement Default or be used in contexts where async initialization isn't practical.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

A note for the community

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions