AWS SDK

AWS SDK

rev. ea2d311746ba470a19bfe57f5a5e9c4253548ac0

Files changed:

tmp-codegen-diff/aws-sdk/Cargo.lock

@@ -1394,1394 +1454,1454 @@
 1414   1414   
 "serial_test",
 1415   1415   
 "socket2 0.6.5",
 1416   1416   
 "tokio",
 1417   1417   
 "tokio-rustls 0.26.5",
 1418   1418   
 "tower",
 1419   1419   
 "tracing",
 1420   1420   
]
 1421   1421   
 1422   1422   
[[package]]
 1423   1423   
name = "aws-smithy-json"
 1424         -
version = "0.63.0"
        1424  +
version = "0.63.1"
 1425   1425   
dependencies = [
 1426   1426   
 "aws-smithy-runtime-api",
 1427   1427   
 "aws-smithy-schema",
 1428   1428   
 "aws-smithy-types",
 1429   1429   
 "proptest",
 1430   1430   
 "serde_json",
 1431   1431   
]
 1432   1432   
 1433   1433   
[[package]]
 1434   1434   
name = "aws-smithy-legacy-http"

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

@@ -37,37 +97,97 @@
   57     57   
[dependencies.aws-smithy-async]
   58     58   
path = "../aws-smithy-async"
   59     59   
version = "1.3.0"
   60     60   
   61     61   
[dependencies.aws-smithy-http]
   62     62   
path = "../aws-smithy-http"
   63     63   
version = "0.64.0"
   64     64   
   65     65   
[dependencies.aws-smithy-json]
   66     66   
path = "../aws-smithy-json"
   67         -
version = "0.63.0"
          67  +
version = "0.63.1"
   68     68   
   69     69   
[dependencies.aws-smithy-runtime]
   70     70   
path = "../aws-smithy-runtime"
   71     71   
features = ["client"]
   72     72   
version = "1.14.0"
   73     73   
   74     74   
[dependencies.aws-smithy-runtime-api]
   75     75   
path = "../aws-smithy-runtime-api"
   76     76   
features = ["client"]
   77     77   
version = "1.16.0"

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

@@ -1,1 +31,31 @@
    1      1   
# Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
    2      2   
[package]
    3      3   
name = "aws-smithy-json"
    4         -
version = "0.63.0"
           4  +
version = "0.63.1"
    5      5   
authors = ["AWS Rust SDK Team <aws-sdk-rust@amazon.com>", "John DiSanti <jdisanti@amazon.com>"]
    6      6   
description = "Token streaming JSON parser for smithy-rs."
    7      7   
edition = "2021"
    8      8   
license = "Apache-2.0"
    9      9   
repository = "https://github.com/smithy-lang/smithy-rs"
   10     10   
rust-version = "1.94.1"
   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"]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/fuzz/Cargo.toml

@@ -17,17 +66,66 @@
   37     37   
edition = "2021"
   38     38   
   39     39   
[package.metadata]
   40     40   
cargo-fuzz = true
   41     41   
   42     42   
[dependencies]
   43     43   
libfuzzer-sys = "=0.4.7"
   44     44   
   45     45   
[dependencies.aws-smithy-json]
   46     46   
path = ".."
   47         -
version = "0.63.0"
          47  +
version = "0.63.1"
   48     48   
   49     49   
[dependencies.aws-smithy-schema]
   50     50   
path = "../../aws-smithy-schema"
   51     51   
version = "0.2.0"
   52     52   
   53     53   
[dependencies.aws-smithy-types]
   54     54   
path = "../../aws-smithy-types"
   55     55   
version = "1.6.3"
   56     56   
   57     57   
[dependencies.arbitrary]

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/src/codec/deserializer.rs

@@ -976,976 +1046,1062 @@
  996    996   
        let n = s.parse::<i64>().map_err(|e| SerdeError::InvalidInput {
  997    997   
            message: e.to_string(),
  998    998   
        })?;
  999    999   
        self.advance_by(len);
 1000   1000   
        Ok(n)
 1001   1001   
    }
 1002   1002   
 1003   1003   
    fn read_float_value(&mut self) -> Result<f64, SerdeError> {
 1004   1004   
        self.skip_whitespace();
 1005   1005   
        let rem = self.remaining();
 1006         -
        // Handle string-encoded special float values: "NaN", "Infinity", "-Infinity"
        1006  +
        // A string may only carry a non-finite value, which JSON cannot express as a number:
        1007  +
        // `"NaN"`, `"Infinity"`, `"-Infinity"`. A quoted finite number such as `"123"` is a
        1008  +
        // type mismatch; the restJson1 protocol tests
        1009  +
        // `RestJsonBodyFloatMalformedValueRejected_case0` and
        1010  +
        // `RestJsonBodyDoubleMalformedValueRejected_case0` require it to be rejected. This
        1011  +
        // mirrors the token-based parser (`expect_number_or_null`), which parses the string
        1012  +
        // with `aws_smithy_types::primitive::Parse` and then rejects finite values, so the
        1013  +
        // spellings Rust's `f64::from_str` accepts for non-finite values (e.g. `"nan"`) are
        1014  +
        // accepted here too.
 1007   1015   
        if rem.first() == Some(&b'"') {
 1008   1016   
            let s = self.read_string(&aws_smithy_schema::prelude::STRING)?;
 1009         -
            return match s.as_str() {
 1010         -
                "NaN" => Ok(f64::NAN),
 1011         -
                "Infinity" => Ok(f64::INFINITY),
 1012         -
                "-Infinity" => Ok(f64::NEG_INFINITY),
 1013         -
                _ => s.parse::<f64>().map_err(|e| SerdeError::InvalidInput {
        1017  +
            let value = match s.as_str() {
        1018  +
                "NaN" => f64::NAN,
        1019  +
                "Infinity" => f64::INFINITY,
        1020  +
                "-Infinity" => f64::NEG_INFINITY,
        1021  +
                other => other.parse::<f64>().map_err(|e| SerdeError::InvalidInput {
 1014   1022   
                    message: e.to_string(),
 1015         -
                }),
        1023  +
                })?,
 1016   1024   
            };
        1025  +
            if value.is_finite() {
        1026  +
                return Err(SerdeError::TypeMismatch {
        1027  +
                    message: format!(
        1028  +
                        "only `Infinity`, `-Infinity`, `NaN` can represent a float as a string but found `{s}`"
        1029  +
                    ),
        1030  +
                });
        1031  +
            }
        1032  +
            return Ok(value);
 1017   1033   
        }
 1018   1034   
        let mut len = 0;
 1019   1035   
        for &b in rem {
 1020   1036   
            if b.is_ascii_digit() || b == b'-' || b == b'+' || b == b'.' || b == b'e' || b == b'E' {
 1021   1037   
                len += 1;
 1022   1038   
            } else {
 1023   1039   
                break;
 1024   1040   
            }
 1025   1041   
        }
 1026   1042   
        if len == 0 {
@@ -2144,2160 +2174,2263 @@
 2164   2180   
        assert_depth_error(err);
 2165   2181   
 2166   2182   
        // 10 levels fits inside the custom limit.
 2167   2183   
        let settings_ok = JsonCodecSettings::builder().max_depth(16).build();
 2168   2184   
        let payload_ok = build_nested("[", "]", 10);
 2169   2185   
        let mut deser_ok = JsonDeserializer::new(&payload_ok, Arc::new(settings_ok));
 2170   2186   
        deser_ok
 2171   2187   
            .read_list(dummy_schema(), &mut recursive_list_consumer)
 2172   2188   
            .expect("10-level nesting should succeed under custom limit");
 2173   2189   
    }
        2190  +
        2191  +
    mod float_strings {
        2192  +
        //! A float or double member may carry a string only for a non-finite value
        2193  +
        //! (`"NaN"`, `"Infinity"`, `"-Infinity"`). Smithy protocol tests
        2194  +
        //! `RestJsonBodyFloatMalformedValueRejected_case0` and
        2195  +
        //! `RestJsonBodyDoubleMalformedValueRejected_case0` (`"123"`) require quoted finite
        2196  +
        //! numbers to be rejected.
        2197  +
        use super::*;
        2198  +
        use aws_smithy_schema::{shape_id, ShapeType};
        2199  +
        2200  +
        static F: Schema =
        2201  +
            Schema::new_member(shape_id!("test", "Input", "f"), ShapeType::Float, "f", 0);
        2202  +
        static D: Schema =
        2203  +
            Schema::new_member(shape_id!("test", "Input", "d"), ShapeType::Double, "d", 1);
        2204  +
        static INPUT: Schema =
        2205  +
            Schema::new_struct(shape_id!("test", "Input"), ShapeType::Structure, &[&F, &D]);
        2206  +
        2207  +
        fn read(body: &[u8]) -> Result<(Option<f32>, Option<f64>), SerdeError> {
        2208  +
            let mut deser = JsonDeserializer::new(body, Arc::new(JsonCodecSettings::default()));
        2209  +
            let (mut f, mut d) = (None, None);
        2210  +
            deser.read_struct(&INPUT, &mut |m, x| {
        2211  +
                match m.member_index() {
        2212  +
                    Some(0) => f = Some(x.read_float(m)?),
        2213  +
                    Some(1) => d = Some(x.read_double(m)?),
        2214  +
                    _ => {}
        2215  +
                }
        2216  +
                Ok(())
        2217  +
            })?;
        2218  +
            Ok((f, d))
        2219  +
        }
        2220  +
        2221  +
        #[test]
        2222  +
        fn numbers_and_the_three_special_strings_are_read() {
        2223  +
            assert_eq!(
        2224  +
                read(br#"{"f": 1.5, "d": -2}"#).unwrap(),
        2225  +
                (Some(1.5), Some(-2.0))
        2226  +
            );
        2227  +
            let (f, d) = read(br#"{"f": "NaN", "d": "-Infinity"}"#).unwrap();
        2228  +
            assert!(f.unwrap().is_nan());
        2229  +
            assert_eq!(d, Some(f64::NEG_INFINITY));
        2230  +
            assert_eq!(
        2231  +
                read(br#"{"f": "Infinity"}"#).unwrap().0,
        2232  +
                Some(f32::INFINITY)
        2233  +
            );
        2234  +
        }
        2235  +
        2236  +
        #[test]
        2237  +
        fn quoted_finite_numbers_are_rejected() {
        2238  +
            assert!(read(br#"{"f": "123"}"#).is_err());
        2239  +
            assert!(read(br#"{"d": "123"}"#).is_err());
        2240  +
            assert!(read(br#"{"d": "1.5e3"}"#).is_err());
        2241  +
            assert!(read(br#"{"d": "-0"}"#).is_err());
        2242  +
        }
        2243  +
        2244  +
        #[test]
        2245  +
        fn non_numeric_strings_are_rejected() {
        2246  +
            assert!(read(br#"{"d": "abc"}"#).is_err());
        2247  +
            assert!(read(br#"{"d": ""}"#).is_err());
        2248  +
            assert!(read(br#"{"d": "1 2"}"#).is_err());
        2249  +
        }
        2250  +
        2251  +
        #[test]
        2252  +
        fn alternative_non_finite_spellings_match_the_legacy_parser() {
        2253  +
            // `aws_smithy_types::primitive::Parse` falls back to `f64::from_str`, which
        2254  +
            // accepts these case-insensitively; only finite results are rejected.
        2255  +
            assert!(read(br#"{"f": "nan"}"#).unwrap().0.unwrap().is_nan());
        2256  +
            assert_eq!(read(br#"{"d": "inf"}"#).unwrap().1, Some(f64::INFINITY));
        2257  +
            assert_eq!(
        2258  +
                read(br#"{"d": "-infinity"}"#).unwrap().1,
        2259  +
                Some(f64::NEG_INFINITY)
        2260  +
            );
        2261  +
        }
        2262  +
    }
 2174   2263   
}

tmp-codegen-diff/aws-sdk/sdk/aws-smithy-json/src/protocol/aws_json_rpc.rs

@@ -165,165 +214,249 @@
  185    185   
        let cfg = cfg_with_metadata("MyService", "DoThing");
  186    186   
        let request = AwsJsonRpcProtocol::aws_json_1_0("MyService")
  187    187   
            .serialize_request(&EmptyStruct, &TEST_SCHEMA, "https://example.com", &cfg)
  188    188   
            .unwrap();
  189    189   
        assert_eq!(
  190    190   
            request.headers().get("X-Amz-Target").unwrap(),
  191    191   
            "MyService.DoThing"
  192    192   
        );
  193    193   
    }
  194    194   
         195  +
    /// A quoted number for a double member must be rejected through the real response path.
         196  +
    /// This is the body of Smithy protocol test `RestJsonBodyDoubleMalformedValueRejected_case0`.
         197  +
    #[test]
         198  +
    fn quoted_number_for_double_member_is_rejected() {
         199  +
        use aws_smithy_runtime_api::http::Response;
         200  +
        use aws_smithy_types::body::SdkBody;
         201  +
         202  +
        static DOUBLE: aws_smithy_schema::Schema = aws_smithy_schema::Schema::new_member(
         203  +
            shape_id!("test", "Output", "doubleInBody"),
         204  +
            ShapeType::Double,
         205  +
            "doubleInBody",
         206  +
            0,
         207  +
        );
         208  +
        static OUTPUT: aws_smithy_schema::Schema = aws_smithy_schema::Schema::new_struct(
         209  +
            shape_id!("test", "Output"),
         210  +
            ShapeType::Structure,
         211  +
            &[&DOUBLE],
         212  +
        );
         213  +
        let read = |body: &str| {
         214  +
            let response = Response::new(200u16.try_into().unwrap(), SdkBody::from(body));
         215  +
            let mut deser = AwsJsonRpcProtocol::aws_json_1_0("TestService")
         216  +
                .deserialize_response(&response, &OUTPUT, &ConfigBag::base())
         217  +
                .unwrap();
         218  +
            let mut value = None;
         219  +
            deser
         220  +
                .read_struct(&OUTPUT, &mut |member, d| {
         221  +
                    value = Some(d.read_double(member)?);
         222  +
                    Ok(())
         223  +
                })
         224  +
                .map(|()| value)
         225  +
        };
         226  +
        assert_eq!(read(r#"{ "doubleInBody" : 123 }"#).unwrap(), Some(123.0));
         227  +
        assert!(read(r#"{ "doubleInBody" : "123" }"#).is_err());
         228  +
    }
         229  +
  195    230   
    #[test]
  196    231   
    fn json_1_0_protocol_id() {
  197    232   
        assert_eq!(
  198    233   
            AwsJsonRpcProtocol::aws_json_1_0("Svc")
  199    234   
                .protocol_id()
  200    235   
                .as_str(),
  201    236   
            "aws.protocols#awsJson1_0"
  202    237   
        );
  203    238   
    }
  204    239   

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

@@ -19,19 +79,79 @@
   39     39   
path = "../aws-smithy-eventstream"
   40     40   
version = "0.61.2"
   41     41   
   42     42   
[dependencies.aws-smithy-http]
   43     43   
path = "../aws-smithy-http"
   44     44   
features = ["event-stream"]
   45     45   
version = "0.64.0"
   46     46   
   47     47   
[dependencies.aws-smithy-json]
   48     48   
path = "../aws-smithy-json"
   49         -
version = "0.63.0"
          49  +
version = "0.63.1"
   50     50   
   51     51   
[dependencies.aws-smithy-observability]
   52     52   
path = "../aws-smithy-observability"
   53     53   
version = "0.3.0"
   54     54   
   55     55   
[dependencies.aws-smithy-runtime]
   56     56   
path = "../aws-smithy-runtime"
   57     57   
features = ["client", "http-auth"]
   58     58   
version = "1.14.0"
   59     59   

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

@@ -15,15 +75,75 @@
   35     35   
path = "../aws-smithy-eventstream"
   36     36   
version = "0.61.2"
   37     37   
   38     38   
[dependencies.aws-smithy-http]
   39     39   
path = "../aws-smithy-http"
   40     40   
features = ["event-stream"]
   41     41   
version = "0.64.0"
   42     42   
   43     43   
[dependencies.aws-smithy-json]
   44     44   
path = "../aws-smithy-json"
   45         -
version = "0.63.0"
          45  +
version = "0.63.1"
   46     46   
   47     47   
[dependencies.aws-smithy-observability]
   48     48   
path = "../aws-smithy-observability"
   49     49   
version = "0.3.0"
   50     50   
   51     51   
[dependencies.aws-smithy-runtime]
   52     52   
path = "../aws-smithy-runtime"
   53     53   
features = ["client"]
   54     54   
version = "1.14.0"
   55     55   

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

@@ -9,9 +69,69 @@
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.3.0"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.64.0"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39         -
version = "0.63.0"
          39  +
version = "0.63.1"
   40     40   
   41     41   
[dependencies.aws-smithy-observability]
   42     42   
path = "../aws-smithy-observability"
   43     43   
version = "0.3.0"
   44     44   
   45     45   
[dependencies.aws-smithy-runtime]
   46     46   
path = "../aws-smithy-runtime"
   47     47   
features = ["client", "http-auth"]
   48     48   
version = "1.14.0"
   49     49   

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

@@ -9,9 +69,69 @@
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.3.0"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.64.0"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39         -
version = "0.63.0"
          39  +
version = "0.63.1"
   40     40   
   41     41   
[dependencies.aws-smithy-observability]
   42     42   
path = "../aws-smithy-observability"
   43     43   
version = "0.3.0"
   44     44   
   45     45   
[dependencies.aws-smithy-runtime]
   46     46   
path = "../aws-smithy-runtime"
   47     47   
features = ["client"]
   48     48   
version = "1.14.0"
   49     49   

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

@@ -9,9 +69,69 @@
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.3.0"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.64.0"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39         -
version = "0.63.0"
          39  +
version = "0.63.1"
   40     40   
   41     41   
[dependencies.aws-smithy-observability]
   42     42   
path = "../aws-smithy-observability"
   43     43   
version = "0.3.0"
   44     44   
   45     45   
[dependencies.aws-smithy-runtime]
   46     46   
path = "../aws-smithy-runtime"
   47     47   
features = ["client"]
   48     48   
version = "1.14.0"
   49     49   

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

@@ -9,9 +69,69 @@
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.3.0"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.64.0"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39         -
version = "0.63.0"
          39  +
version = "0.63.1"
   40     40   
   41     41   
[dependencies.aws-smithy-observability]
   42     42   
path = "../aws-smithy-observability"
   43     43   
version = "0.3.0"
   44     44   
   45     45   
[dependencies.aws-smithy-query]
   46     46   
path = "../aws-smithy-query"
   47     47   
version = "0.62.0"
   48     48   
   49     49   
[dependencies.aws-smithy-runtime]

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

@@ -9,9 +69,69 @@
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.3.0"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.64.0"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39         -
version = "0.63.0"
          39  +
version = "0.63.1"
   40     40   
   41     41   
[dependencies.aws-smithy-observability]
   42     42   
path = "../aws-smithy-observability"
   43     43   
version = "0.3.0"
   44     44   
   45     45   
[dependencies.aws-smithy-runtime]
   46     46   
path = "../aws-smithy-runtime"
   47     47   
features = ["client"]
   48     48   
version = "1.14.0"
   49     49   

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

@@ -13,13 +73,73 @@
   33     33   
[dependencies.aws-smithy-async]
   34     34   
path = "../aws-smithy-async"
   35     35   
version = "1.3.0"
   36     36   
   37     37   
[dependencies.aws-smithy-http]
   38     38   
path = "../aws-smithy-http"
   39     39   
version = "0.64.0"
   40     40   
   41     41   
[dependencies.aws-smithy-json]
   42     42   
path = "../aws-smithy-json"
   43         -
version = "0.63.0"
          43  +
version = "0.63.1"
   44     44   
   45     45   
[dependencies.aws-smithy-observability]
   46     46   
path = "../aws-smithy-observability"
   47     47   
version = "0.3.0"
   48     48   
   49     49   
[dependencies.aws-smithy-runtime]
   50     50   
path = "../aws-smithy-runtime"
   51     51   
features = ["client"]
   52     52   
version = "1.14.0"
   53     53   

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

@@ -9,9 +69,69 @@
   29     29   
[dependencies.aws-smithy-async]
   30     30   
path = "../aws-smithy-async"
   31     31   
version = "1.3.0"
   32     32   
   33     33   
[dependencies.aws-smithy-http]
   34     34   
path = "../aws-smithy-http"
   35     35   
version = "0.64.0"
   36     36   
   37     37   
[dependencies.aws-smithy-json]
   38     38   
path = "../aws-smithy-json"
   39         -
version = "0.63.0"
          39  +
version = "0.63.1"
   40     40   
   41     41   
[dependencies.aws-smithy-observability]
   42     42   
path = "../aws-smithy-observability"
   43     43   
version = "0.3.0"
   44     44   
   45     45   
[dependencies.aws-smithy-query]
   46     46   
path = "../aws-smithy-query"
   47     47   
version = "0.62.0"
   48     48   
   49     49   
[dependencies.aws-smithy-runtime]