AWS SDK

AWS SDK

rev. dff3160f3e58065fc69d1740cde7e1223681535b

Files changed:

tmp-codegen-diff/aws-sdk/README.md

@@ -1,1 +57,57 @@
   17     17   
   18     18   
> For a step-by-step guide including several advanced use cases, check out the [Developer Guide](https://docs.aws.amazon.com/sdk-for-rust/latest/dg/welcome.html).
   19     19   
   20     20   
The SDK provides one crate per AWS service. You must add [Tokio](https://crates.io/crates/tokio) as a dependency within your Rust project to execute asynchronous code.
   21     21   
   22     22   
1. Create a new Rust project: `cargo new sdk-example`
   23     23   
2. Add dependencies to DynamoDB and Tokio to your **Cargo.toml** file:
   24     24   
   25     25   
    ```toml
   26     26   
    [dependencies]
   27         -
    aws-config = { version= "1.8.2", features = ["behavior-version-latest"] }
          27  +
    aws-config = { version= "1.8.3", features = ["behavior-version-latest"] }
   28     28   
    aws-sdk-dynamodb = "0.0.0-local"
   29     29   
    tokio = { version = "1", features = ["full"] }
   30     30   
    ```
   31     31   
   32     32   
3. Provide your AWS credentials with the default credential provider chain, which currently looks in:
   33     33   
   - Environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION`
   34     34   
   - The default credentials files located in `~/.aws/config` and `~/.aws/credentials` (location can vary per platform)
   35     35   
   - Web Identity Token credentials from the environment or container (including EKS)
   36     36   
   - ECS Container Credentials (IAM roles for tasks)
   37     37   
   - EC2 Instance Metadata Service (IAM Roles attached to instance)

tmp-codegen-diff/aws-sdk/sdk/aws-config/Cargo.toml

@@ -1,1 +34,34 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-config"
    4         -
version = "1.8.2"
           4  +
version = "1.8.3"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "Russell Cohen <rcoh@amazon.com>"]
    6      6   
description = "AWS SDK config and credential provider implementations."
    7      7   
edition = "2021"
    8      8   
exclude = ["test-data/*", "integration-tests/*"]
    9      9   
license = "Apache-2.0"
   10     10   
repository = "https://github.com/smithy-lang/smithy-rs"
   11     11   
[package.metadata.docs.rs]
   12     12   
all-features = true
   13     13   
targets = ["x86_64-unknown-linux-gnu"]
   14     14   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
@@ -39,39 +157,157 @@
   59     59   
path = "../aws-smithy-http"
   60     60   
version = "0.62.1"
   61     61   
   62     62   
[dependencies.aws-smithy-json]
   63     63   
path = "../aws-smithy-json"
   64     64   
version = "0.61.4"
   65     65   
   66     66   
[dependencies.aws-smithy-runtime]
   67     67   
path = "../aws-smithy-runtime"
   68     68   
features = ["client"]
   69         -
version = "1.8.4"
          69  +
version = "1.8.5"
   70     70   
   71     71   
[dependencies.aws-smithy-runtime-api]
   72     72   
path = "../aws-smithy-runtime-api"
   73     73   
features = ["client"]
   74         -
version = "1.8.3"
          74  +
version = "1.8.4"
   75     75   
   76     76   
[dependencies.aws-smithy-types]
   77     77   
path = "../aws-smithy-types"
   78     78   
version = "1.3.2"
   79     79   
   80     80   
[dependencies.aws-types]
   81     81   
path = "../aws-types"
   82         -
version = "1.3.7"
          82  +
version = "1.3.8"
   83     83   
   84     84   
[dependencies.time]
   85     85   
version = "0.3.4"
   86     86   
features = ["parsing"]
   87     87   
   88     88   
[dependencies.tokio]
   89     89   
version = "1.13.1"
   90     90   
features = ["sync"]
   91     91   
   92     92   
[dependencies.tracing]
   93     93   
version = "0.1"
   94     94   
   95     95   
[dependencies.aws-sdk-sso]
   96     96   
path = "../sso"
   97     97   
default-features = false
   98     98   
optional = true
   99     99   
version = "0.0.0-local"
  100    100   
  101    101   
[dependencies.ring]
  102    102   
version = "0.17.5"
  103    103   
optional = true
  104    104   
  105    105   
[dependencies.hex]
  106    106   
version = "0.4.3"
  107    107   
optional = true
  108    108   
  109    109   
[dependencies.zeroize]
  110    110   
version = "1"
  111    111   
optional = true
  112    112   
  113    113   
[dependencies.aws-sdk-ssooidc]
  114    114   
path = "../ssooidc"
  115    115   
default-features = false
  116    116   
optional = true
  117    117   
version = "0.0.0-local"
  118    118   
  119    119   
[dev-dependencies]
  120    120   
tracing-test = "0.2.4"
  121    121   
serde_json = "1"
  122    122   
  123    123   
[dev-dependencies.aws-smithy-async]
  124    124   
path = "../aws-smithy-async"
  125    125   
features = ["rt-tokio", "test-util"]
  126    126   
version = "1.2.5"
  127    127   
  128    128   
[dev-dependencies.aws-smithy-runtime]
  129    129   
path = "../aws-smithy-runtime"
  130    130   
features = ["client", "test-util"]
  131         -
version = "1.8.4"
         131  +
version = "1.8.5"
  132    132   
  133    133   
[dev-dependencies.aws-smithy-http-client]
  134    134   
path = "../aws-smithy-http-client"
  135    135   
features = ["default-client", "test-util"]
  136    136   
version = "1.0.6"
  137    137   
  138    138   
[dev-dependencies.aws-smithy-runtime-api]
  139    139   
path = "../aws-smithy-runtime-api"
  140    140   
features = ["test-util"]
  141         -
version = "1.8.3"
         141  +
version = "1.8.4"
  142    142   
  143    143   
[dev-dependencies.futures-util]
  144    144   
version = "0.3.29"
  145    145   
default-features = false
  146    146   
  147    147   
[dev-dependencies.tracing-subscriber]
  148    148   
version = "0.3.16"
  149    149   
features = ["fmt", "json"]
  150    150   
  151    151   
[dev-dependencies.tokio]

tmp-codegen-diff/aws-sdk/sdk/aws-config/external-types.toml

@@ -1,1 +48,39 @@
    1      1   
# IMPORTANT: Types from `aws-sdk-*` crates MUST NOT be allowed to be
    2      2   
# exposed in `aws-config`'s public API. Otherwise, `aws-config` will
    3      3   
# require manual version bumping every time an automated version bump
    4      4   
# to the exposed SDK crates happens.
    5      5   
allowed_external_types = [
    6         -
   "aws_credential_types::cache::CredentialsCache",
    7      6   
   "aws_credential_types::provider::credentials::ProvideCredentials",
    8      7   
   "aws_credential_types::provider::credentials::Result",
    9         -
   "aws_credential_types::provider::credentials::SharedCredentialsProvider",
   10      8   
   "aws_credential_types::provider::token::ProvideToken",
   11      9   
   "aws_runtime::env_config::error::EnvConfigFileLoadError",
   12     10   
   "aws_runtime::env_config::file::Builder",
   13     11   
   "aws_runtime::env_config::file::EnvConfigFileKind",
   14     12   
   "aws_runtime::env_config::file::EnvConfigFiles",
   15     13   
   "aws_runtime::env_config::parse::EnvConfigParseError",
   16     14   
   "aws_runtime::env_config::property::Property",
   17     15   
   "aws_runtime::env_config::section::EnvConfigSections",
   18     16   
   "aws_runtime::env_config::section::Profile",
   19     17   
   "aws_smithy_async::rt::sleep::AsyncSleep",
   20         -
   "aws_smithy_async::rt::sleep::SharedAsyncSleep",
   21         -
   "aws_smithy_async::time::SharedTimeSource",
   22     18   
   "aws_smithy_async::time::TimeSource",
   23     19   
   "aws_smithy_runtime::client::identity::cache::IdentityCache",
   24     20   
   "aws_smithy_runtime::client::identity::cache::lazy::LazyCacheBuilder",
          21  +
   "aws_smithy_runtime_api::client::auth::AuthSchemePreference",
   25     22   
   "aws_smithy_runtime_api::box_error::BoxError",
   26     23   
   "aws_smithy_runtime_api::client::behavior_version::BehaviorVersion",
   27     24   
   "aws_smithy_runtime_api::client::dns::ResolveDns",
   28         -
   "aws_smithy_runtime_api::client::dns::SharedDnsResolver",
   29     25   
   "aws_smithy_runtime_api::client::http::HttpClient",
   30         -
   "aws_smithy_runtime_api::client::http::SharedHttpClient",
   31     26   
   "aws_smithy_runtime_api::client::identity::ResolveCachedIdentity",
   32     27   
   "aws_smithy_runtime_api::client::identity::ResolveIdentity",
   33     28   
   "aws_smithy_runtime_api::client::orchestrator::HttpResponse",
   34         -
   "aws_smithy_runtime_api::client::result::SdkError",
   35     29   
   "aws_smithy_runtime_api::client::retries::classifiers::ClassifyRetry",
   36     30   
   "aws_smithy_runtime_api::client::retries::classifiers::SharedRetryClassifier",
   37     31   
   "aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig",
   38         -
   "aws_smithy_types::body::SdkBody",
   39     32   
   "aws_smithy_types::checksum_config::RequestChecksumCalculation",
   40     33   
   "aws_smithy_types::checksum_config::ResponseChecksumValidation",
   41         -
   "aws_smithy_types::retry",
   42     34   
   "aws_smithy_types::retry::*",
   43         -
   "aws_smithy_types::timeout",
   44     35   
   "aws_smithy_types::timeout::OperationTimeoutConfig",
   45     36   
   "aws_smithy_types::timeout::TimeoutConfig",
   46     37   
   "aws_smithy_types::timeout::TimeoutConfigBuilder",
   47     38   
   "aws_types::*",
   48     39   
]

tmp-codegen-diff/aws-sdk/sdk/aws-config/fuzz/Cargo.toml

@@ -1,1 +30,30 @@
   13     13   
edition = "2021"
   14     14   
   15     15   
[package.metadata]
   16     16   
cargo-fuzz = true
   17     17   
   18     18   
[dependencies]
   19     19   
libfuzzer-sys = "=0.4.7"
   20     20   
   21     21   
[dependencies.aws-config]
   22     22   
path = ".."
   23         -
version = "1.8.2"
          23  +
version = "1.8.3"
   24     24   
   25     25   
[dependencies.aws-types]
   26     26   
path = "../../../sdk/build/aws-sdk/sdk/aws-types"
   27         -
version = "1.3.7"
          27  +
version = "1.3.8"
   28     28   
   29     29   
[workspace]
   30     30   
members = ["."]

tmp-codegen-diff/aws-sdk/sdk/aws-config/src/default_provider.rs

@@ -42,42 +0,74 @@
   62     62   
pub mod disable_request_compression;
   63     63   
   64     64   
/// Default "request minimum compression size bytes" provider chain
   65     65   
pub mod request_min_compression_size_bytes;
   66     66   
   67     67   
/// Default provider chains for request/response checksum configuration
   68     68   
pub mod checksums;
   69     69   
   70     70   
/// Default provider chain for account-based endpoint mode
   71     71   
pub mod account_id_endpoint_mode;
          72  +
          73  +
/// Default provider chain for auth scheme preference list
          74  +
pub mod auth_scheme_preference;

tmp-codegen-diff/aws-sdk/sdk/aws-config/src/default_provider/auth_scheme_preference.rs

@@ -0,1 +0,182 @@
           1  +
/*
           2  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           3  +
 * SPDX-License-Identifier: Apache-2.0
           4  +
 */
           5  +
           6  +
use crate::provider_config::ProviderConfig;
           7  +
use aws_runtime::env_config::EnvConfigValue;
           8  +
use aws_smithy_runtime_api::client::auth::{AuthSchemeId, AuthSchemePreference};
           9  +
use aws_smithy_types::error::display::DisplayErrorContext;
          10  +
use std::borrow::Cow;
          11  +
use std::fmt;
          12  +
          13  +
mod env {
          14  +
    pub(super) const AUTH_SCHEME_PREFERENCE: &str = "AWS_AUTH_SCHEME_PREFERENCE";
          15  +
}
          16  +
          17  +
mod profile_key {
          18  +
    pub(super) const AUTH_SCHEME_PREFERENCE: &str = "auth_scheme_preference";
          19  +
}
          20  +
          21  +
/// Load the value for the auth scheme preference
          22  +
///
          23  +
/// This checks the following sources:
          24  +
/// 1. The environment variable `AWS_AUTH_SCHEME_PREFERENCE=scheme1,scheme2,scheme3`
          25  +
/// 2. The profile key `auth_scheme_preference=scheme1,scheme2,scheme3`
          26  +
///
          27  +
/// A scheme name can be either a fully qualified name or a shorthand with the namespace prefix trimmed.
          28  +
/// For example, valid scheme names include "aws.auth#sigv4", "smithy.api#httpBasicAuth", "sigv4", and "httpBasicAuth".
          29  +
/// Whitespace (spaces or tabs), including leading, trailing, and between names, is ignored.
          30  +
///
          31  +
/// Returns `None` if a parsed string component is empty when creating an `AuthSchemeId`.
          32  +
pub(crate) async fn auth_scheme_preference_provider(
          33  +
    provider_config: &ProviderConfig,
          34  +
) -> Option<AuthSchemePreference> {
          35  +
    let env = provider_config.env();
          36  +
    let profiles = provider_config.profile().await;
          37  +
          38  +
    EnvConfigValue::new()
          39  +
        .env(env::AUTH_SCHEME_PREFERENCE)
          40  +
        .profile(profile_key::AUTH_SCHEME_PREFERENCE)
          41  +
        .validate(&env, profiles, parse_auth_scheme_names)
          42  +
        .map_err(|err| tracing::warn!(err = %DisplayErrorContext(&err), "invalid value for `AuthSchemePreference`"))
          43  +
        .unwrap_or(None)
          44  +
}
          45  +
          46  +
fn parse_auth_scheme_names(csv: &str) -> Result<AuthSchemePreference, InvalidAuthSchemeNamesCsv> {
          47  +
    csv.split(',')
          48  +
        .map(|s| {
          49  +
            let trimmed = s.trim().replace([' ', '\t'], "");
          50  +
            if trimmed.is_empty() {
          51  +
                return Err(InvalidAuthSchemeNamesCsv {
          52  +
                    value: format!("Empty name found in `{csv}`."),
          53  +
                });
          54  +
            }
          55  +
            let scheme_name = trimmed.split('#').next_back().unwrap_or(&trimmed);
          56  +
            Ok(AuthSchemeId::from(Cow::Owned(scheme_name.to_owned())))
          57  +
        })
          58  +
        .collect::<Result<Vec<_>, _>>()
          59  +
        .map(AuthSchemePreference::from)
          60  +
}
          61  +
          62  +
#[derive(Debug)]
          63  +
pub(crate) struct InvalidAuthSchemeNamesCsv {
          64  +
    value: String,
          65  +
}
          66  +
          67  +
impl fmt::Display for InvalidAuthSchemeNamesCsv {
          68  +
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
          69  +
        write!(
          70  +
            f,
          71  +
            "Not a valid comma-separated auth scheme names: {}",
          72  +
            self.value
          73  +
        )
          74  +
    }
          75  +
}
          76  +
          77  +
impl std::error::Error for InvalidAuthSchemeNamesCsv {}
          78  +
          79  +
#[cfg(test)]
          80  +
mod test {
          81  +
    use super::env;
          82  +
    use crate::{
          83  +
        default_provider::auth_scheme_preference::auth_scheme_preference_provider,
          84  +
        provider_config::ProviderConfig,
          85  +
    };
          86  +
    use aws_types::os_shim_internal::Env;
          87  +
    use tracing_test::traced_test;
          88  +
          89  +
    #[tokio::test]
          90  +
    #[traced_test]
          91  +
    async fn log_error_on_invalid_value() {
          92  +
        let conf = ProviderConfig::empty().with_env(Env::from_slice(&[(
          93  +
            env::AUTH_SCHEME_PREFERENCE,
          94  +
            "scheme1, , \tscheme2",
          95  +
        )]));
          96  +
        assert_eq!(None, auth_scheme_preference_provider(&conf).await);
          97  +
        assert!(logs_contain(
          98  +
            "Not a valid comma-separated auth scheme names: Empty name found"
          99  +
        ));
         100  +
    }
         101  +
         102  +
    #[cfg(feature = "sso")] // for aws-smithy-runtime-api/http-auth
         103  +
    mod http_auth_tests {
         104  +
        use super::env;
         105  +
        #[allow(deprecated)]
         106  +
        use crate::profile::profile_file::{ProfileFileKind, ProfileFiles};
         107  +
        use crate::{
         108  +
            default_provider::auth_scheme_preference::auth_scheme_preference_provider,
         109  +
            provider_config::ProviderConfig,
         110  +
        };
         111  +
        use aws_smithy_runtime_api::client::auth::AuthSchemePreference;
         112  +
        use aws_types::os_shim_internal::{Env, Fs};
         113  +
         114  +
        #[tokio::test]
         115  +
        async fn environment_priority() {
         116  +
            let conf = ProviderConfig::empty()
         117  +
            .with_env(Env::from_slice(&[(
         118  +
                env::AUTH_SCHEME_PREFERENCE,
         119  +
                "aws.auth#sigv4, smithy.api#httpBasicAuth, smithy.api#httpDigestAuth, smithy.api#httpBearerAuth, smithy.api#httpApiKeyAuth",
         120  +
            )]))
         121  +
            .with_profile_config(
         122  +
                Some(
         123  +
                    #[allow(deprecated)]
         124  +
                    ProfileFiles::builder()
         125  +
                        .with_file(
         126  +
                            #[allow(deprecated)]
         127  +
                            ProfileFileKind::Config,
         128  +
                            "conf",
         129  +
                        )
         130  +
                        .build(),
         131  +
                ),
         132  +
                None,
         133  +
            )
         134  +
            .with_fs(Fs::from_slice(&[(
         135  +
                "conf",
         136  +
                "[default]\nauth_scheme_preference = scheme1, scheme2 , \tscheme3 \t",
         137  +
            )]));
         138  +
            assert_eq!(
         139  +
                AuthSchemePreference::from([
         140  +
                    aws_runtime::auth::sigv4::SCHEME_ID,
         141  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_BASIC_AUTH_SCHEME_ID,
         142  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_DIGEST_AUTH_SCHEME_ID,
         143  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_BEARER_AUTH_SCHEME_ID,
         144  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_API_KEY_AUTH_SCHEME_ID,
         145  +
                ]),
         146  +
                auth_scheme_preference_provider(&conf).await.unwrap()
         147  +
            );
         148  +
        }
         149  +
         150  +
        #[tokio::test]
         151  +
        async fn load_from_profile() {
         152  +
            let conf = ProviderConfig::empty()
         153  +
            .with_profile_config(
         154  +
                Some(
         155  +
                    #[allow(deprecated)]
         156  +
                    ProfileFiles::builder()
         157  +
                        .with_file(
         158  +
                            #[allow(deprecated)]
         159  +
                            ProfileFileKind::Config,
         160  +
                            "conf",
         161  +
                        )
         162  +
                        .build(),
         163  +
                ),
         164  +
                None,
         165  +
            )
         166  +
            .with_fs(Fs::from_slice(&[(
         167  +
                "conf",
         168  +
                "[default]\nauth_scheme_preference = sigv4, httpBasicAuth, httpDigestAuth, \thttpBearerAuth \t, httpApiKeyAuth ",
         169  +
            )]));
         170  +
            assert_eq!(
         171  +
                AuthSchemePreference::from([
         172  +
                    aws_runtime::auth::sigv4::SCHEME_ID,
         173  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_BASIC_AUTH_SCHEME_ID,
         174  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_DIGEST_AUTH_SCHEME_ID,
         175  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_BEARER_AUTH_SCHEME_ID,
         176  +
                    aws_smithy_runtime_api::client::auth::http::HTTP_API_KEY_AUTH_SCHEME_ID,
         177  +
                ]),
         178  +
                auth_scheme_preference_provider(&conf).await.unwrap()
         179  +
            );
         180  +
        }
         181  +
    }
         182  +
}

tmp-codegen-diff/aws-sdk/sdk/aws-config/src/lib.rs

@@ -196,196 +303,306 @@
  216    216   
mod loader {
  217    217   
    use crate::env_service_config::EnvServiceConfig;
  218    218   
    use aws_credential_types::provider::{
  219    219   
        token::{ProvideToken, SharedTokenProvider},
  220    220   
        ProvideCredentials, SharedCredentialsProvider,
  221    221   
    };
  222    222   
    use aws_credential_types::Credentials;
  223    223   
    use aws_smithy_async::rt::sleep::{default_async_sleep, AsyncSleep, SharedAsyncSleep};
  224    224   
    use aws_smithy_async::time::{SharedTimeSource, TimeSource};
  225    225   
    use aws_smithy_runtime::client::identity::IdentityCache;
         226  +
    use aws_smithy_runtime_api::client::auth::AuthSchemePreference;
  226    227   
    use aws_smithy_runtime_api::client::behavior_version::BehaviorVersion;
  227    228   
    use aws_smithy_runtime_api::client::http::HttpClient;
  228    229   
    use aws_smithy_runtime_api::client::identity::{ResolveCachedIdentity, SharedIdentityCache};
  229    230   
    use aws_smithy_runtime_api::client::stalled_stream_protection::StalledStreamProtectionConfig;
  230    231   
    use aws_smithy_runtime_api::shared::IntoShared;
  231    232   
    use aws_smithy_types::checksum_config::{
  232    233   
        RequestChecksumCalculation, ResponseChecksumValidation,
  233    234   
    };
  234    235   
    use aws_smithy_types::retry::RetryConfig;
  235    236   
    use aws_smithy_types::timeout::TimeoutConfig;
  236    237   
    use aws_types::app_name::AppName;
  237    238   
    use aws_types::docs_for;
  238    239   
    use aws_types::endpoint_config::AccountIdEndpointMode;
  239    240   
    use aws_types::origin::Origin;
  240    241   
    use aws_types::os_shim_internal::{Env, Fs};
  241    242   
    use aws_types::sdk_config::SharedHttpClient;
  242    243   
    use aws_types::SdkConfig;
  243    244   
  244    245   
    use crate::default_provider::{
  245         -
        account_id_endpoint_mode, app_name, checksums, credentials, disable_request_compression,
  246         -
        endpoint_url, ignore_configured_endpoint_urls as ignore_ep, region,
  247         -
        request_min_compression_size_bytes, retry_config, timeout_config, use_dual_stack, use_fips,
         246  +
        account_id_endpoint_mode, app_name, auth_scheme_preference, checksums, credentials,
         247  +
        disable_request_compression, endpoint_url, ignore_configured_endpoint_urls as ignore_ep,
         248  +
        region, request_min_compression_size_bytes, retry_config, timeout_config, use_dual_stack,
         249  +
        use_fips,
  248    250   
    };
  249    251   
    use crate::meta::region::ProvideRegion;
  250    252   
    #[allow(deprecated)]
  251    253   
    use crate::profile::profile_file::ProfileFiles;
  252    254   
    use crate::provider_config::ProviderConfig;
  253    255   
  254    256   
    #[derive(Default, Debug)]
  255    257   
    enum TriStateOption<T> {
  256    258   
        /// No option was set by the user. We can set up the default.
  257    259   
        #[default]
  258    260   
        NotSet,
  259    261   
        /// The option was explicitly unset. Do not set up a default.
  260    262   
        ExplicitlyUnset,
  261    263   
        /// Use the given user provided option.
  262    264   
        Set(T),
  263    265   
    }
  264    266   
  265    267   
    /// Load a cross-service [`SdkConfig`] from the environment
  266    268   
    ///
  267    269   
    /// This builder supports overriding individual components of the generated config. Overriding a component
  268    270   
    /// will skip the standard resolution chain from **for that component**. For example,
  269    271   
    /// if you override the region provider, _even if that provider returns None_, the default region provider
  270    272   
    /// chain will not be used.
  271    273   
    #[derive(Default, Debug)]
  272    274   
    pub struct ConfigLoader {
  273    275   
        app_name: Option<AppName>,
         276  +
        auth_scheme_preference: Option<AuthSchemePreference>,
  274    277   
        identity_cache: Option<SharedIdentityCache>,
  275    278   
        credentials_provider: TriStateOption<SharedCredentialsProvider>,
  276    279   
        token_provider: Option<SharedTokenProvider>,
  277    280   
        account_id_endpoint_mode: Option<AccountIdEndpointMode>,
  278    281   
        endpoint_url: Option<String>,
  279    282   
        region: Option<Box<dyn ProvideRegion>>,
  280    283   
        retry_config: Option<RetryConfig>,
  281    284   
        sleep: Option<SharedAsyncSleep>,
  282    285   
        timeout_config: Option<TimeoutConfig>,
  283    286   
        provider_config: Option<ProviderConfig>,
@@ -376,379 +435,460 @@
  396    399   
        ///
  397    400   
        /// The HTTP client will be used for both AWS services and credentials providers.
  398    401   
        ///
  399    402   
        /// If you wish to use a separate HTTP client for credentials providers when creating clients,
  400    403   
        /// then override the HTTP client set with this function on the client-specific `Config`s.
  401    404   
        pub fn http_client(mut self, http_client: impl HttpClient + 'static) -> Self {
  402    405   
            self.http_client = Some(http_client.into_shared());
  403    406   
            self
  404    407   
        }
  405    408   
         409  +
        #[doc = docs_for!(auth_scheme_preference)]
         410  +
        ///
         411  +
        /// # Examples
         412  +
        /// ```no_run
         413  +
        /// # use aws_smithy_runtime_api::client::auth::AuthSchemeId;
         414  +
        /// # async fn create_config() {
         415  +
        /// let config = aws_config::from_env()
         416  +
        ///     // Favors a custom auth scheme over the SigV4 auth scheme.
         417  +
        ///     // Note: This will not result in an error, even if the custom scheme is missing from the resolved auth schemes.
         418  +
        ///     .auth_scheme_preference([AuthSchemeId::from("custom"), aws_runtime::auth::sigv4::SCHEME_ID])
         419  +
        ///     .load()
         420  +
        ///     .await;
         421  +
        /// # }
         422  +
        /// ```
         423  +
        pub fn auth_scheme_preference(
         424  +
            mut self,
         425  +
            auth_scheme_preference: impl Into<AuthSchemePreference>,
         426  +
        ) -> Self {
         427  +
            self.auth_scheme_preference = Some(auth_scheme_preference.into());
         428  +
            self
         429  +
        }
         430  +
  406    431   
        /// Override the identity cache used to build [`SdkConfig`].
  407    432   
        ///
  408    433   
        /// The identity cache caches AWS credentials and SSO tokens. By default, a lazy cache is used
  409    434   
        /// that will load credentials upon first request, cache them, and then reload them during
  410    435   
        /// another request when they are close to expiring.
  411    436   
        ///
  412    437   
        /// # Examples
  413    438   
        ///
  414    439   
        /// Change a setting on the default lazy caching implementation:
  415    440   
        /// ```no_run
@@ -935,960 +1006,1039 @@
  955    980   
                    checksums::response_checksum_validation_provider(&conf).await
  956    981   
                };
  957    982   
  958    983   
            let account_id_endpoint_mode =
  959    984   
                if let Some(acccount_id_endpoint_mode) = self.account_id_endpoint_mode {
  960    985   
                    Some(acccount_id_endpoint_mode)
  961    986   
                } else {
  962    987   
                    account_id_endpoint_mode::account_id_endpoint_mode_provider(&conf).await
  963    988   
                };
  964    989   
         990  +
            let auth_scheme_preference =
         991  +
                if let Some(auth_scheme_preference) = self.auth_scheme_preference {
         992  +
                    Some(auth_scheme_preference)
         993  +
                } else {
         994  +
                    auth_scheme_preference::auth_scheme_preference_provider(&conf).await
         995  +
                };
         996  +
  965    997   
            builder.set_request_checksum_calculation(request_checksum_calculation);
  966    998   
            builder.set_response_checksum_validation(response_checksum_validation);
  967    999   
            builder.set_identity_cache(identity_cache);
  968   1000   
            builder.set_credentials_provider(credentials_provider);
  969   1001   
            builder.set_token_provider(token_provider);
  970   1002   
            builder.set_sleep_impl(sleep_impl);
  971   1003   
            builder.set_use_fips(use_fips);
  972   1004   
            builder.set_use_dual_stack(use_dual_stack);
  973   1005   
            builder.set_disable_request_compression(disable_request_compression);
  974   1006   
            builder.set_request_min_compression_size_bytes(request_min_compression_size_bytes);
  975   1007   
            builder.set_stalled_stream_protection(self.stalled_stream_protection_config);
  976   1008   
            builder.set_account_id_endpoint_mode(account_id_endpoint_mode);
        1009  +
            builder.set_auth_scheme_preference(auth_scheme_preference);
  977   1010   
            builder.build()
  978   1011   
        }
  979   1012   
    }
  980   1013   
  981   1014   
    #[cfg(test)]
  982   1015   
    impl ConfigLoader {
  983   1016   
        pub(crate) fn env(mut self, env: Env) -> Self {
  984   1017   
            self.env = Some(env);
  985   1018   
            self
  986   1019   
        }

tmp-codegen-diff/aws-sdk/sdk/aws-credential-types/Cargo.toml

@@ -7,7 +49,49 @@
   27     27   
path = "../aws-smithy-async"
   28     28   
version = "1.2.5"
   29     29   
   30     30   
[dependencies.aws-smithy-types]
   31     31   
path = "../aws-smithy-types"
   32     32   
version = "1.3.2"
   33     33   
   34     34   
[dependencies.aws-smithy-runtime-api]
   35     35   
path = "../aws-smithy-runtime-api"
   36     36   
features = ["client", "http-auth"]
   37         -
version = "1.8.3"
          37  +
version = "1.8.4"
   38     38   
   39     39   
[dev-dependencies]
   40     40   
async-trait = "0.1.74"
   41     41   
   42     42   
[dev-dependencies.aws-smithy-runtime-api]
   43     43   
path = "../aws-smithy-runtime-api"
   44     44   
features = ["test-util"]
   45         -
version = "1.8.3"
          45  +
version = "1.8.4"
   46     46   
   47     47   
[dev-dependencies.tokio]
   48     48   
version = "1.23.1"
   49     49   
features = ["full", "test-util", "rt"]

tmp-codegen-diff/aws-sdk/sdk/aws-runtime/Cargo.toml

@@ -28,28 +144,144 @@
   48     48   
optional = true
   49     49   
version = "0.60.9"
   50     50   
   51     51   
[dependencies.aws-smithy-http]
   52     52   
path = "../aws-smithy-http"
   53     53   
version = "0.62.1"
   54     54   
   55     55   
[dependencies.aws-smithy-runtime]
   56     56   
path = "../aws-smithy-runtime"
   57     57   
features = ["client"]
   58         -
version = "1.8.4"
          58  +
version = "1.8.5"
   59     59   
   60     60   
[dependencies.aws-smithy-runtime-api]
   61     61   
path = "../aws-smithy-runtime-api"
   62     62   
features = ["client"]
   63         -
version = "1.8.3"
          63  +
version = "1.8.4"
   64     64   
   65     65   
[dependencies.aws-smithy-types]
   66     66   
path = "../aws-smithy-types"
   67     67   
version = "1.3.2"
   68     68   
   69     69   
[dependencies.aws-types]
   70     70   
path = "../aws-types"
   71         -
version = "1.3.7"
          71  +
version = "1.3.8"
   72     72   
   73     73   
[dependencies.http-02x]
   74     74   
package = "http"
   75     75   
version = "0.2.9"
   76     76   
   77     77   
[dependencies.http-body-04x]
   78     78   
package = "http-body"
   79     79   
version = "0.4.5"
   80     80   
   81     81   
[dependencies.http-1x]
   82     82   
package = "http"
   83     83   
version = "1.1.0"
   84     84   
optional = true
   85     85   
   86     86   
[dependencies.http-body-1x]
   87     87   
package = "http-body"
   88     88   
version = "1.0.0"
   89     89   
optional = true
   90     90   
   91     91   
[dependencies.regex-lite]
   92     92   
version = "0.1.5"
   93     93   
optional = true
   94     94   
   95     95   
[dependencies.uuid]
   96     96   
version = "1"
   97     97   
   98     98   
[dev-dependencies]
   99     99   
arbitrary = "1.3"
  100    100   
bytes-utils = "0.1.2"
  101    101   
convert_case = "0.6.0"
  102    102   
proptest = "1.2"
  103    103   
serde_json = "1"
  104    104   
tracing-test = "0.2.4"
  105    105   
  106    106   
[dev-dependencies.aws-credential-types]
  107    107   
path = "../aws-credential-types"
  108    108   
features = ["test-util"]
  109    109   
version = "1.2.4"
  110    110   
  111    111   
[dev-dependencies.aws-smithy-async]
  112    112   
path = "../aws-smithy-async"
  113    113   
features = ["test-util"]
  114    114   
version = "1.2.5"
  115    115   
  116    116   
[dev-dependencies.aws-smithy-protocol-test]
  117    117   
path = "../aws-smithy-protocol-test"
  118    118   
version = "0.63.4"
  119    119   
  120    120   
[dev-dependencies.aws-smithy-runtime-api]
  121    121   
path = "../aws-smithy-runtime-api"
  122    122   
features = ["test-util"]
  123         -
version = "1.8.3"
         123  +
version = "1.8.4"
  124    124   
  125    125   
[dev-dependencies.aws-smithy-types]
  126    126   
path = "../aws-smithy-types"
  127    127   
features = ["test-util"]
  128    128   
version = "1.3.2"
  129    129   
  130    130   
[dev-dependencies.futures-util]
  131    131   
version = "0.3.29"
  132    132   
default-features = false
  133    133   

tmp-codegen-diff/aws-sdk/sdk/aws-sigv4/Cargo.toml

@@ -31,31 +91,91 @@
   51     51   
optional = true
   52     52   
version = "0.60.9"
   53     53   
   54     54   
[dependencies.aws-smithy-http]
   55     55   
path = "../aws-smithy-http"
   56     56   
version = "0.62.1"
   57     57   
   58     58   
[dependencies.aws-smithy-runtime-api]
   59     59   
path = "../aws-smithy-runtime-api"
   60     60   
features = ["client"]
   61         -
version = "1.8.3"
          61  +
version = "1.8.4"
   62     62   
   63     63   
[dependencies.aws-smithy-types]
   64     64   
path = "../aws-smithy-types"
   65     65   
version = "1.3.2"
   66     66   
   67     67   
[dependencies.form_urlencoded]
   68     68   
version = "1.2.1"
   69     69   
optional = true
   70     70   
   71     71   
[dependencies.http0]
@@ -94,94 +130,130 @@
  114    114   
criterion = "0.5"
  115    115   
  116    116   
[dev-dependencies.aws-credential-types]
  117    117   
path = "../aws-credential-types"
  118    118   
features = ["test-util", "hardcoded-credentials"]
  119    119   
version = "1.2.4"
  120    120   
  121    121   
[dev-dependencies.aws-smithy-runtime-api]
  122    122   
path = "../aws-smithy-runtime-api"
  123    123   
features = ["client", "test-util"]
  124         -
version = "1.8.3"
         124  +
version = "1.8.4"
  125    125   
  126    126   
[dev-dependencies.time]
  127    127   
version = "0.3.5"
  128    128   
features = ["parsing"]
  129    129   
[target."cfg(not(any(target_arch = \"powerpc\", target_arch = \"powerpc64\")))".dev-dependencies]
  130    130   
ring = "0.17.5"

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-compression/Cargo.toml

@@ -3,3 +63,63 @@
   23     23   
futures-util = "0.3"
   24     24   
pin-project-lite = "0.2.14"
   25     25   
tracing = "0.1.40"
   26     26   
   27     27   
[dependencies.aws-smithy-types]
   28     28   
path = "../aws-smithy-types"
   29     29   
version = "1.3.2"
   30     30   
   31     31   
[dependencies.aws-smithy-runtime-api]
   32     32   
path = "../aws-smithy-runtime-api"
   33         -
version = "1.8.3"
          33  +
version = "1.8.4"
   34     34   
   35     35   
[dependencies.http-0-2]
   36     36   
package = "http"
   37     37   
version = "0.2.9"
   38     38   
optional = true
   39     39   
   40     40   
[dependencies.http-1-0]
   41     41   
package = "http"
   42     42   
version = "1"
   43     43   
optional = true

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http-client/Cargo.toml

@@ -32,32 +92,92 @@
   52     52   
pin-project-lite = "0.2.14"
   53     53   
tracing = "0.1.40"
   54     54   
   55     55   
[dependencies.aws-smithy-async]
   56     56   
path = "../aws-smithy-async"
   57     57   
version = "1.2.5"
   58     58   
   59     59   
[dependencies.aws-smithy-runtime-api]
   60     60   
path = "../aws-smithy-runtime-api"
   61     61   
features = ["client"]
   62         -
version = "1.8.3"
          62  +
version = "1.8.4"
   63     63   
   64     64   
[dependencies.aws-smithy-types]
   65     65   
path = "../aws-smithy-types"
   66     66   
version = "1.3.2"
   67     67   
   68     68   
[dependencies.aws-smithy-protocol-test]
   69     69   
path = "../aws-smithy-protocol-test"
   70     70   
optional = true
   71     71   
version = "0.63.4"
   72     72   
@@ -171,171 +221,221 @@
  191    191   
tokio-rustls = "0.26.1"
  192    192   
  193    193   
[dev-dependencies.aws-smithy-async]
  194    194   
path = "../aws-smithy-async"
  195    195   
features = ["rt-tokio", "test-util"]
  196    196   
version = "1.2.5"
  197    197   
  198    198   
[dev-dependencies.aws-smithy-runtime-api]
  199    199   
path = "../aws-smithy-runtime-api"
  200    200   
features = ["test-util"]
  201         -
version = "1.8.3"
         201  +
version = "1.8.4"
  202    202   
  203    203   
[dev-dependencies.aws-smithy-types]
  204    204   
path = "../aws-smithy-types"
  205    205   
features = ["http-body-0-4-x", "test-util"]
  206    206   
version = "1.3.2"
  207    207   
  208    208   
[dev-dependencies.http-body-util]
  209    209   
version = "0.1.2"
  210    210   
  211    211   
[dev-dependencies.hyper-util]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-http/Cargo.toml

@@ -7,7 +67,67 @@
   27     27   
futures-core = "0.3.31"
   28     28   
   29     29   
[dependencies.aws-smithy-eventstream]
   30     30   
path = "../aws-smithy-eventstream"
   31     31   
optional = true
   32     32   
version = "0.60.9"
   33     33   
   34     34   
[dependencies.aws-smithy-runtime-api]
   35     35   
path = "../aws-smithy-runtime-api"
   36     36   
features = ["client", "http-02x"]
   37         -
version = "1.8.3"
          37  +
version = "1.8.4"
   38     38   
   39     39   
[dependencies.aws-smithy-types]
   40     40   
path = "../aws-smithy-types"
   41     41   
features = ["byte-stream-poll-next", "http-body-0-4-x"]
   42     42   
version = "1.3.2"
   43     43   
   44     44   
[dependencies.http-02x]
   45     45   
package = "http"
   46     46   
version = "0.2.9"
   47     47   

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-mocks-experimental/Cargo.toml

@@ -1,1 +29,29 @@
   16     16   
targets = ["x86_64-unknown-linux-gnu"]
   17     17   
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]
   18     18   
rustdoc-args = ["--cfg", "docsrs"]
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21     21   
version = "1.3.2"
   22     22   
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "../aws-smithy-runtime-api"
   25     25   
features = ["client", "http-02x"]
   26         -
version = "1.8.3"
          26  +
version = "1.8.4"
   27     27   
[dev-dependencies.tokio]
   28     28   
version = "1"
   29     29   
features = ["full"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-mocks/Cargo.toml

@@ -1,1 +0,44 @@
   16     16   
[dependencies]
   17     17   
http = "1"
   18     18   
   19     19   
[dependencies.aws-smithy-types]
   20     20   
path = "../aws-smithy-types"
   21     21   
version = "1.3.2"
   22     22   
   23     23   
[dependencies.aws-smithy-runtime-api]
   24     24   
path = "../aws-smithy-runtime-api"
   25     25   
features = ["client", "http-1x"]
   26         -
version = "1.8.3"
          26  +
version = "1.8.4"
   27     27   
   28     28   
[dependencies.aws-smithy-http-client]
   29     29   
path = "../aws-smithy-http-client"
   30     30   
features = ["test-util"]
   31     31   
version = "1.0.6"
   32     32   
[dev-dependencies.tokio]
   33     33   
version = "1"
   34     34   
features = ["full"]
   35     35   
   36     36   
[dev-dependencies.aws-smithy-async]
   37     37   
path = "../aws-smithy-async"
   38     38   
features = ["rt-tokio"]
   39     39   
version = "1.2.5"
   40     40   
   41     41   
[dev-dependencies.aws-smithy-runtime]
   42     42   
path = "../aws-smithy-runtime"
   43     43   
features = ["client"]
   44         -
version = "1.8.4"
          44  +
version = "1.8.5"