AWS SDK

AWS SDK

rev. a158fac64746607a30779ccb9064e8902c558500

Files changed:

tmp-codegen-diff/aws-sdk/sdk/timestreamwrite/src/observability_feature.rs

@@ -0,1 +0,36 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
          14  +
// Interceptor that tracks Smithy SDK features for observability (tracing/metrics).
          15  +
#[derive(Debug, Default)]
          16  +
pub(crate) struct ObservabilityFeatureTrackerInterceptor;
          17  +
          18  +
impl Intercept for ObservabilityFeatureTrackerInterceptor {
          19  +
    fn name(&self) -> &'static str {
          20  +
        "ObservabilityFeatureTrackerInterceptor"
          21  +
    }
          22  +
          23  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          24  +
        // Check if an OpenTelemetry meter provider is configured via the global provider
          25  +
        if let Ok(telemetry_provider) = aws_smithy_observability::global::get_telemetry_provider() {
          26  +
            let meter_provider = telemetry_provider.meter_provider();
          27  +
          28  +
            // Use provider_name() to detect OpenTelemetry without importing the otel crate.
          29  +
            if meter_provider.provider_name() == "AwsSmithyObservabilityOtelProvider" {
          30  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          31  +
            }
          32  +
        }
          33  +
          34  +
        Ok(())
          35  +
    }
          36  +
}

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

@@ -1,1 +154,158 @@
   15     15   
[package.metadata.docs.rs]
   16     16   
all-features = true
   17     17   
targets = ["x86_64-unknown-linux-gnu"]
   18     18   
[dependencies.aws-credential-types]
   19     19   
path = "../aws-credential-types"
   20     20   
version = "1.2.11"
   21     21   
   22     22   
[dependencies.aws-runtime]
   23     23   
path = "../aws-runtime"
   24     24   
features = ["event-stream"]
   25         -
version = "1.5.17"
          25  +
version = "1.5.18"
   26     26   
   27     27   
[dependencies.aws-sigv4]
   28     28   
path = "../aws-sigv4"
   29     29   
version = "1.3.7"
   30     30   
   31     31   
[dependencies.aws-smithy-async]
   32     32   
path = "../aws-smithy-async"
   33     33   
version = "1.2.7"
   34     34   
   35     35   
[dependencies.aws-smithy-eventstream]
   36     36   
path = "../aws-smithy-eventstream"
   37     37   
version = "0.60.14"
   38     38   
   39     39   
[dependencies.aws-smithy-http]
   40     40   
path = "../aws-smithy-http"
   41     41   
features = ["event-stream"]
   42     42   
version = "0.62.6"
   43     43   
   44     44   
[dependencies.aws-smithy-json]
   45     45   
path = "../aws-smithy-json"
   46     46   
version = "0.61.9"
   47     47   
          48  +
[dependencies.aws-smithy-observability]
          49  +
path = "../aws-smithy-observability"
          50  +
version = "0.2.0"
          51  +
   48     52   
[dependencies.aws-smithy-runtime]
   49     53   
path = "../aws-smithy-runtime"
   50     54   
features = ["client"]
   51         -
version = "1.9.6"
          55  +
version = "1.9.7"
   52     56   
   53     57   
[dependencies.aws-smithy-runtime-api]
   54     58   
path = "../aws-smithy-runtime-api"
   55     59   
features = ["client", "http-02x"]
   56     60   
version = "1.9.3"
   57     61   
   58     62   
[dependencies.aws-smithy-types]
   59     63   
path = "../aws-smithy-types"
   60     64   
features = ["http-body-0-4-x"]
   61     65   
version = "1.3.5"
   62     66   
   63     67   
[dependencies.aws-types]
   64     68   
path = "../aws-types"
   65     69   
version = "1.3.11"
   66     70   
   67     71   
[dependencies.bytes]
   68     72   
version = "1.4.0"
   69     73   
   70     74   
[dependencies.fastrand]
   71     75   
version = "2.0.0"
   72     76   
   73     77   
[dependencies.http]
   74     78   
version = "0.2.9"
   75     79   
   76     80   
[dependencies.hyper]
   77     81   
version = "0.14.26"
   78     82   
features = ["stream"]
   79     83   
   80     84   
[dependencies.regex-lite]
   81     85   
version = "0.1.5"
   82     86   
   83     87   
[dependencies.tracing]
   84     88   
version = "0.1"
   85     89   
[dev-dependencies.async-stream]
   86     90   
version = "0.3.0"
   87     91   
   88     92   
[dev-dependencies.aws-config]
   89     93   
path = "../aws-config"
   90     94   
version = "1.8.12"
   91     95   
   92     96   
[dev-dependencies.aws-credential-types]
   93     97   
path = "../aws-credential-types"
   94     98   
features = ["test-util"]
   95     99   
version = "1.2.11"
   96    100   
   97    101   
[dev-dependencies.aws-runtime]
   98    102   
path = "../aws-runtime"
   99    103   
features = ["test-util"]
  100         -
version = "1.5.17"
         104  +
version = "1.5.18"
  101    105   
  102    106   
[dev-dependencies.aws-smithy-async]
  103    107   
path = "../aws-smithy-async"
  104    108   
features = ["test-util"]
  105    109   
version = "1.2.7"
  106    110   
  107    111   
[dev-dependencies.aws-smithy-eventstream]
  108    112   
path = "../aws-smithy-eventstream"
  109    113   
features = ["test-util"]
  110    114   
version = "0.60.14"
  111    115   
  112    116   
[dev-dependencies.aws-smithy-http-client]
  113    117   
path = "../aws-smithy-http-client"
  114    118   
features = ["test-util", "wire-mock"]
  115    119   
version = "1.1.5"
  116    120   
  117    121   
[dev-dependencies.aws-smithy-protocol-test]
  118    122   
path = "../aws-smithy-protocol-test"
  119    123   
version = "0.63.7"
  120    124   
  121    125   
[dev-dependencies.aws-smithy-runtime]
  122    126   
path = "../aws-smithy-runtime"
  123    127   
features = ["test-util"]
  124         -
version = "1.9.6"
         128  +
version = "1.9.7"
  125    129   
  126    130   
[dev-dependencies.aws-smithy-runtime-api]
  127    131   
path = "../aws-smithy-runtime-api"
  128    132   
features = ["test-util"]
  129    133   
version = "1.9.3"
  130    134   
  131    135   
[dev-dependencies.aws-smithy-types]
  132    136   
path = "../aws-smithy-types"
  133    137   
features = ["test-util"]
  134    138   
version = "1.3.5"

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

@@ -1278,1278 +1337,1338 @@
 1298   1298   
        runtime_components.push_interceptor(crate::sdk_feature_tracker::retry_mode::RetryModeFeatureTrackerInterceptor::new());
 1299   1299   
        runtime_components.push_interceptor(::aws_runtime::service_clock_skew::ServiceClockSkewInterceptor::new());
 1300   1300   
        runtime_components.push_interceptor(::aws_runtime::request_info::RequestInfoInterceptor::new());
 1301   1301   
        runtime_components.push_interceptor(::aws_runtime::user_agent::UserAgentInterceptor::new());
 1302   1302   
        runtime_components.push_interceptor(::aws_runtime::invocation_id::InvocationIdInterceptor::new());
 1303   1303   
        runtime_components.push_interceptor(::aws_runtime::recursion_detection::RecursionDetectionInterceptor::new());
 1304   1304   
        runtime_components.push_auth_scheme(::aws_smithy_runtime_api::client::auth::SharedAuthScheme::new(
 1305   1305   
            ::aws_runtime::auth::sigv4::SigV4AuthScheme::new(),
 1306   1306   
        ));
 1307   1307   
        runtime_components.push_interceptor(crate::config::endpoint::EndpointOverrideFeatureTrackerInterceptor);
        1308  +
        runtime_components.push_interceptor(crate::observability_feature::ObservabilityFeatureTrackerInterceptor);
 1308   1309   
        Self { config, runtime_components }
 1309   1310   
    }
 1310   1311   
}
 1311   1312   
 1312   1313   
impl ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugin for ServiceRuntimePlugin {
 1313   1314   
    fn config(&self) -> ::std::option::Option<::aws_smithy_types::config_bag::FrozenLayer> {
 1314   1315   
        self.config.clone()
 1315   1316   
    }
 1316   1317   
 1317   1318   
    fn order(&self) -> ::aws_smithy_runtime_api::client::runtime_plugin::Order {

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

@@ -168,168 +211,213 @@
  188    188   
/// Primitives such as `Blob` or `DateTime` used by other types.
  189    189   
pub mod primitives;
  190    190   
  191    191   
/// Data structures used by operation inputs/outputs.
  192    192   
pub mod types;
  193    193   
  194    194   
mod event_receiver;
  195    195   
  196    196   
mod event_stream_serde;
  197    197   
         198  +
mod observability_feature;
         199  +
  198    200   
pub(crate) mod protocol_serde;
  199    201   
  200    202   
mod sdk_feature_tracker;
  201    203   
  202    204   
mod serialization_settings;
  203    205   
  204    206   
mod endpoint_lib;
  205    207   
  206    208   
mod json_errors;
  207    209   

tmp-codegen-diff/aws-sdk/sdk/transcribestreaming/src/observability_feature.rs

@@ -0,1 +0,36 @@
           1  +
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
           2  +
/*
           3  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           4  +
 * SPDX-License-Identifier: Apache-2.0
           5  +
 */
           6  +
           7  +
use aws_smithy_runtime::client::sdk_feature::SmithySdkFeature;
           8  +
use aws_smithy_runtime_api::{
           9  +
    box_error::BoxError,
          10  +
    client::interceptors::{context::BeforeSerializationInterceptorContextRef, Intercept},
          11  +
};
          12  +
use aws_smithy_types::config_bag::ConfigBag;
          13  +
          14  +
// Interceptor that tracks Smithy SDK features for observability (tracing/metrics).
          15  +
#[derive(Debug, Default)]
          16  +
pub(crate) struct ObservabilityFeatureTrackerInterceptor;
          17  +
          18  +
impl Intercept for ObservabilityFeatureTrackerInterceptor {
          19  +
    fn name(&self) -> &'static str {
          20  +
        "ObservabilityFeatureTrackerInterceptor"
          21  +
    }
          22  +
          23  +
    fn read_before_execution(&self, _context: &BeforeSerializationInterceptorContextRef<'_>, cfg: &mut ConfigBag) -> Result<(), BoxError> {
          24  +
        // Check if an OpenTelemetry meter provider is configured via the global provider
          25  +
        if let Ok(telemetry_provider) = aws_smithy_observability::global::get_telemetry_provider() {
          26  +
            let meter_provider = telemetry_provider.meter_provider();
          27  +
          28  +
            // Use provider_name() to detect OpenTelemetry without importing the otel crate.
          29  +
            if meter_provider.provider_name() == "AwsSmithyObservabilityOtelProvider" {
          30  +
                cfg.interceptor_state().store_append(SmithySdkFeature::ObservabilityOtelMetrics);
          31  +
            }
          32  +
        }
          33  +
          34  +
        Ok(())
          35  +
    }
          36  +
}

tmp-codegen-diff/aws-sdk/tests/no-default-features/Cargo.toml

@@ -2,2 +54,54 @@
   22     22   
default-features = false
   23     23   
version = "0.0.0-local"
   24     24   
   25     25   
[dev-dependencies.aws-smithy-async]
   26     26   
path = "../../sdk/aws-smithy-async"
   27     27   
version = "1.2.7"
   28     28   
   29     29   
[dev-dependencies.aws-smithy-runtime]
   30     30   
path = "../../sdk/aws-smithy-runtime"
   31     31   
features = ["test-util"]
   32         -
version = "1.9.6"
          32  +
version = "1.9.7"
   33     33   
   34     34   
[dev-dependencies.aws-smithy-http-client]
   35     35   
path = "../../sdk/aws-smithy-http-client"
   36     36   
features = ["test-util"]
   37     37   
version = "1.1.5"
   38     38   
   39     39   
[dev-dependencies.aws-credential-types]
   40     40   
path = "../../sdk/aws-credential-types"
   41     41   
features = ["test-util"]
   42     42   
version = "1.2.11"

tmp-codegen-diff/aws-sdk/tests/telemetry/Cargo.toml

@@ -1,1 +60,65 @@
   13     13   
serial_test = "3.1.1"
   14     14   
tracing = "0.1.40"
   15     15   
tracing-subscriber = "0.3.18"
   16     16   
tracing-fluent-assertions = "0.3.0"
   17     17   
   18     18   
[dev-dependencies.aws-config]
   19     19   
path = "../../sdk/aws-config"
   20     20   
features = ["test-util", "behavior-version-latest"]
   21     21   
version = "1.8.12"
   22     22   
          23  +
[dev-dependencies.aws-runtime]
          24  +
path = "../../sdk/aws-runtime"
          25  +
features = ["test-util"]
          26  +
version = "1.5.18"
          27  +
   23     28   
[dev-dependencies.aws-sdk-dynamodb]
   24     29   
path = "../../sdk/dynamodb"
   25     30   
features = ["test-util", "behavior-version-latest"]
   26     31   
version = "0.0.0-local"
   27     32   
   28     33   
[dev-dependencies.aws-sdk-s3]
   29     34   
path = "../../sdk/s3"
   30     35   
features = ["test-util", "behavior-version-latest"]
   31     36   
version = "0.0.0-local"
   32     37   
   33     38   
[dev-dependencies.aws-smithy-observability]
   34     39   
path = "../../sdk/aws-smithy-observability"
   35         -
version = "0.1.5"
          40  +
version = "0.2.0"
   36     41   
   37     42   
[dev-dependencies.aws-smithy-observability-otel]
   38     43   
path = "../../sdk/aws-smithy-observability-otel"
   39         -
version = "0.1.3"
          44  +
version = "0.1.4"
   40     45   
   41     46   
[dev-dependencies.aws-smithy-runtime]
   42     47   
path = "../../sdk/aws-smithy-runtime"
   43     48   
features = ["client", "test-util"]
   44         -
version = "1.9.6"
          49  +
version = "1.9.7"
   45     50   
   46     51   
[dev-dependencies.aws-smithy-types]
   47     52   
path = "../../sdk/aws-smithy-types"
   48     53   
version = "1.3.5"
   49     54   
   50     55   
[dev-dependencies.opentelemetry]
   51     56   
version = "0.26.0"
   52     57   
features = ["metrics"]
   53     58   
   54     59   
[dev-dependencies.opentelemetry_sdk]

tmp-codegen-diff/aws-sdk/tests/telemetry/tests/observability_feature_metrics.rs

@@ -0,1 +0,102 @@
           1  +
/*
           2  +
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
           3  +
 * SPDX-License-Identifier: Apache-2.0
           4  +
 */
           5  +
           6  +
use aws_config::Region;
           7  +
use aws_runtime::user_agent::test_util::{
           8  +
    assert_ua_contains_metric_values, assert_ua_does_not_contain_metric_values,
           9  +
};
          10  +
use aws_sdk_s3::config::{Credentials, SharedCredentialsProvider};
          11  +
use aws_smithy_observability::TelemetryProvider;
          12  +
use aws_smithy_runtime::client::http::test_util::{ReplayEvent, StaticReplayClient};
          13  +
use aws_smithy_types::body::SdkBody;
          14  +
use serial_test::serial;
          15  +
use utils::init_metrics;
          16  +
          17  +
mod utils;
          18  +
          19  +
// Note: These tests are written with a multi-threaded runtime since OTel requires that to work
          20  +
// and they are all run serially since they touch global state
          21  +
          22  +
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
          23  +
#[serial]
          24  +
async fn observability_otel_metrics_feature_tracked_in_user_agent() {
          25  +
    let (meter_provider, _exporter) = init_metrics();
          26  +
          27  +
    // Create a replay client to capture the actual HTTP request
          28  +
    let http_client = StaticReplayClient::new(vec![ReplayEvent::new(
          29  +
        http::Request::builder().body(SdkBody::empty()).unwrap(),
          30  +
        http::Response::builder().body(SdkBody::empty()).unwrap(),
          31  +
    )]);
          32  +
          33  +
    let config = aws_config::SdkConfig::builder()
          34  +
        .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests()))
          35  +
        .region(Region::new("us-east-1"))
          36  +
        .http_client(http_client.clone())
          37  +
        .build();
          38  +
          39  +
    let s3_client = aws_sdk_s3::Client::new(&config);
          40  +
    let _ = s3_client
          41  +
        .get_object()
          42  +
        .bucket("test-bucket")
          43  +
        .key("test.txt")
          44  +
        .send()
          45  +
        .await;
          46  +
          47  +
    // Get the actual HTTP request that was made
          48  +
    let requests = http_client.actual_requests();
          49  +
    let last_request = requests.last().expect("should have made a request");
          50  +
          51  +
    let user_agent = last_request
          52  +
        .headers()
          53  +
        .get("x-amz-user-agent")
          54  +
        .expect("should have user-agent header");
          55  +
          56  +
    // Should contain OBSERVABILITY_OTEL_METRICS metric (value "7")
          57  +
    assert_ua_contains_metric_values(user_agent, &["7"]);
          58  +
          59  +
    meter_provider.flush().unwrap();
          60  +
          61  +
    // Reset to noop for other tests
          62  +
    aws_smithy_observability::global::set_telemetry_provider(TelemetryProvider::noop()).unwrap();
          63  +
}
          64  +
          65  +
#[tokio::test(flavor = "multi_thread", worker_threads = 1)]
          66  +
#[serial]
          67  +
async fn noop_provider_does_not_track_observability_metrics() {
          68  +
    // Reset to noop provider
          69  +
    aws_smithy_observability::global::set_telemetry_provider(TelemetryProvider::noop()).unwrap();
          70  +
          71  +
    // Create a replay client to capture the actual HTTP request
          72  +
    let http_client = StaticReplayClient::new(vec![ReplayEvent::new(
          73  +
        http::Request::builder().body(SdkBody::empty()).unwrap(),
          74  +
        http::Response::builder().body(SdkBody::empty()).unwrap(),
          75  +
    )]);
          76  +
          77  +
    let config = aws_config::SdkConfig::builder()
          78  +
        .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests()))
          79  +
        .region(Region::new("us-east-1"))
          80  +
        .http_client(http_client.clone())
          81  +
        .build();
          82  +
          83  +
    let s3_client = aws_sdk_s3::Client::new(&config);
          84  +
    let _ = s3_client
          85  +
        .get_object()
          86  +
        .bucket("test-bucket")
          87  +
        .key("test.txt")
          88  +
        .send()
          89  +
        .await;
          90  +
          91  +
    // Get the actual HTTP request that was made
          92  +
    let requests = http_client.actual_requests();
          93  +
    let last_request = requests.last().expect("should have made a request");
          94  +
          95  +
    let user_agent = last_request
          96  +
        .headers()
          97  +
        .get("x-amz-user-agent")
          98  +
        .expect("should have user-agent header");
          99  +
         100  +
    // Should NOT contain OBSERVABILITY_OTEL_METRICS metric when using noop provider
         101  +
    assert_ua_does_not_contain_metric_values(user_agent, &["7"]);
         102  +
}

tmp-codegen-diff/aws-sdk/tests/telemetry/tests/utils/mod.rs

@@ -16,16 +147,151 @@
   36     36   
   37     37   
    let sdk_mp = Arc::new(OtelMeterProvider::new(otel_mp));
   38     38   
    let sdk_ref = sdk_mp.clone();
   39     39   
    let sdk_tp = TelemetryProvider::builder().meter_provider(sdk_mp).build();
   40     40   
   41     41   
    let _ = set_telemetry_provider(sdk_tp);
   42     42   
   43     43   
    (sdk_ref, exporter)
   44     44   
}
   45     45   
          46  +
#[allow(dead_code)]
   46     47   
pub(crate) fn new_replay_client(num_requests: usize, with_retry: bool) -> StaticReplayClient {
   47     48   
    let mut events = Vec::with_capacity(num_requests);
   48     49   
    let mut start = 0;
   49     50   
   50     51   
    if with_retry {
   51     52   
        events.push(ReplayEvent::new(
   52     53   
            http::Request::builder().body(SdkBody::empty()).unwrap(),
   53     54   
            http::Response::builder()
   54     55   
                .status(500)
   55     56   
                .body(SdkBody::empty())
   56     57   
                .unwrap(),
   57     58   
        ));
   58     59   
        start += 1;
   59     60   
    }
   60     61   
   61     62   
    for _ in start..num_requests {
   62     63   
        events.push(ReplayEvent::new(
   63     64   
            http::Request::builder().body(SdkBody::empty()).unwrap(),
   64     65   
            http::Response::builder().body(SdkBody::empty()).unwrap(),
   65     66   
        ))
   66     67   
    }
   67     68   
    StaticReplayClient::new(events)
   68     69   
}
   69     70   
   70     71   
#[allow(unused)]
   71     72   
pub(crate) fn extract_metric_data<'a, T: 'static>(
   72     73   
    metrics: &'a Vec<ResourceMetrics>,
   73     74   
    metric_name: &str,
   74     75   
) -> &'a T {
   75     76   
    &metrics[0].scope_metrics[0]
   76     77   
        .metrics
   77     78   
        .iter()
   78     79   
        .find(|metric| metric.name == metric_name)
   79     80   
        .unwrap()
   80     81   
        .data
   81     82   
        .as_any()
   82     83   
        .downcast_ref::<T>()
   83     84   
        .unwrap()
   84     85   
}
   85     86   
   86     87   
#[allow(unused)]
   87     88   
pub(crate) fn extract_metric_attributes<'a>(
   88     89   
    metrics: &'a Vec<ResourceMetrics>,
   89     90   
    metric_name: &str,
   90     91   
) -> Vec<Vec<KeyValue>> {
   91     92   
    extract_metric_data::<Histogram<f64>>(metrics, metric_name)
   92     93   
        .data_points
   93     94   
        .iter()
   94     95   
        .map(|dp| dp.attributes.clone())
   95     96   
        .collect()
   96     97   
}
   97     98   
          99  +
#[allow(dead_code)]
   98    100   
pub(crate) async fn make_s3_call(config: &SdkConfig) {
   99    101   
    let s3_client = aws_sdk_s3::Client::new(config);
  100    102   
    let _ = s3_client
  101    103   
        .get_object()
  102    104   
        .bucket("some-test-bucket")
  103    105   
        .key("test.txt")
  104    106   
        .send()
  105    107   
        .await;
  106    108   
}
  107    109   
         110  +
#[allow(dead_code)]
  108    111   
pub(crate) async fn make_ddb_call(config: &SdkConfig) {
  109    112   
    let ddb_client = aws_sdk_dynamodb::Client::new(&config);
  110    113   
    let _ = ddb_client
  111    114   
        .get_item()
  112    115   
        .table_name("test-table")
  113    116   
        .key("foo", AttributeValue::Bool(true))
  114    117   
        .send()
  115    118   
        .await;
  116    119   
}
  117    120   
         121  +
#[allow(dead_code)]
  118    122   
pub(crate) fn make_config(with_retry: bool) -> SdkConfig {
  119    123   
    SdkConfig::builder()
  120    124   
        .credentials_provider(SharedCredentialsProvider::new(Credentials::for_tests()))
  121    125   
        .region(Region::new("us-east-1"))
  122    126   
        .http_client(new_replay_client(2, with_retry))
  123    127   
        .retry_config(RetryConfig::standard())
  124    128   
        .build()
  125    129   
}
  126    130   
  127    131   
/// Util for printing spans for debugging purposes. Can be used with: