pub fn default_provider() -> Builder
Expand description

Default RetryConfig Provider chain

Unlike other “providers” RetryConfig has no related RetryConfigProvider trait. Instead, a builder struct is returned which has a similar API.

This provider will check the following sources in order:

  1. Environment variables
  2. Profile file

Example

When running aws_config::from_env(), a ConfigLoader is created that will then create a RetryConfig from the default_provider. There is no need to call default_provider and the example below is only for illustration purposes.

use aws_config::default_provider::retry_config;

// Load a retry config from a specific profile
let retry_config = retry_config::default_provider()
    .profile_name("other_profile")
    .retry_config()
    .await;
let config = aws_config::from_env()
    // Override the retry config set by the default profile
    .retry_config(retry_config)
    .load()
    .await;
// instantiate a service client:
// <my_aws_service>::Client::new(&config);