diff --git a/Cargo.lock b/Cargo.lock index 41b75bbaf4524..a7f84d72c7b14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -593,19 +593,20 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-config" -version = "0.51.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a636c44c77fa18bdba56126a34d30cfe5538fe88f7d34988fa731fee143ddd" +checksum = "741327a7f70e6e639bdb5061964c66250460c70ad3f59c3fe2a3a64ac1484e33" dependencies = [ + "aws-credential-types", "aws-http", "aws-sdk-sso", "aws-sdk-sts", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", "aws-smithy-json", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "hex", @@ -619,14 +620,27 @@ dependencies = [ "zeroize", ] +[[package]] +name = "aws-credential-types" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f99dd587a46af58f8cf37773687ecec19d0373a5954942d7e0f405751fe2369" +dependencies = [ + "aws-smithy-async", + "aws-smithy-types", + "tokio", + "tracing 0.1.37", + "zeroize", +] + [[package]] name = "aws-endpoint" -version = "0.51.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ca8f374874f6459aaa88dc861d7f5d834ca1ff97668eae190e97266b5f6c3fb" +checksum = "13fdfc00c57d95e10bcf83d2331c4ae9ca460ca84dc983b2cdd692de87640389" dependencies = [ - "aws-smithy-http 0.51.0", - "aws-smithy-types 0.51.0", + "aws-smithy-http", + "aws-smithy-types", "aws-types", "http", "regex", @@ -635,12 +649,13 @@ dependencies = [ [[package]] name = "aws-http" -version = "0.51.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78d41e19e779b73463f5f0c21b3aacc995f4ba783ab13a7ae9f5dfb159a551b4" +checksum = "74cdac70481d144bf7001c27884b95ee12c8f62e61db90320d59b673ae121cb8" dependencies = [ - "aws-smithy-http 0.51.0", - "aws-smithy-types 0.51.0", + "aws-credential-types", + "aws-smithy-http", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "http", @@ -653,250 +668,265 @@ dependencies = [ [[package]] name = "aws-sdk-cloudwatch" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520b1ac14f0850d0d6a69136d15ba7702d41ee7f4014a5d2d1bf4a86e74f7a6b" +checksum = "d28d9292a854b545b03a1fa6d8fec512f7ffb58bc4df2f213b375a105d9e7706" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", "aws-smithy-query", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-smithy-xml", "aws-types", "bytes 1.4.0", "http", + "regex", "tokio-stream", "tower", ] [[package]] name = "aws-sdk-cloudwatchlogs" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89415e55b57044a09a7eb0a885c2d0af1aa7f95b373e0e898f71a28d7e7d10f9" +checksum = "d85cce88c109db7f60cb51ee5d99abc05e454638281ec187954078c06386937d" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", "aws-smithy-json", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "http", + "regex", "tokio-stream", "tower", ] [[package]] name = "aws-sdk-elasticsearch" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f4cc10278701dbc0d386ddd8cddfda2695eae7103a54eae11b981f28779ff2" +checksum = "0572334dae37527f4cc47409b2084b7c9a74f88f7686359e6f5967a136749262" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", "aws-smithy-json", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "http", + "regex", "tokio-stream", "tower", + "url", ] [[package]] name = "aws-sdk-firehose" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68310f9d7860b4fe73c58e5cec4d7a310a658d1a983fdf176eb35149939896a" +checksum = "cdb7a4fe8c486dba75bfe248eea441b7b1db615f5f048b9604882a116e4e1f99" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", "aws-smithy-json", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "http", + "regex", "tower", + "url", ] [[package]] name = "aws-sdk-kinesis" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37766fdf50feab317b4f939b1c9ee58a2a1c51785974328ce84cff1eea7a1bb8" +checksum = "0d86beba79e9b24f13a6f3f2ff13ca2da332c3d60c44c2d2632bbacb87ee9ad2" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", "aws-smithy-json", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "http", + "regex", "tokio-stream", "tower", ] [[package]] name = "aws-sdk-s3" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f08665c8e03aca8cb092ef01e617436ebfa977fddc1240e1b062488ab5d48a" +checksum = "5ae411cb03ea6df0d4c4340a0d3c15cab7b19715d091f76c5629f31acd6403f3" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", - "aws-sigv4 0.51.0", + "aws-sigv4", "aws-smithy-async", "aws-smithy-checksums", "aws-smithy-client", "aws-smithy-eventstream", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", - "aws-smithy-types 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", + "aws-smithy-types", "aws-smithy-xml", "aws-types", "bytes 1.4.0", "bytes-utils", + "fastrand", "http", "http-body", + "once_cell", + "percent-encoding", + "regex", "tokio-stream", "tower", "tracing 0.1.37", + "url", ] [[package]] name = "aws-sdk-sqs" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b26bb3d12238492cb12bde0de8486679b007daada21fdb110913b32a2a38275" +checksum = "ffe1f563e227905539d5d1514e93a4c4e096366e1325ab24646783a3d6fe2c45" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", "aws-smithy-query", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-smithy-xml", "aws-types", "bytes 1.4.0", "http", + "regex", "tokio-stream", "tower", + "url", ] [[package]] name = "aws-sdk-sso" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86dcb1cb71aa8763b327542ead410424515cff0cde5b753eedd2917e09c63734" +checksum = "d5d2fb56182ac693a19364cc0bde22d95aef9be3663bf9b906ffbd0ab0a7c7d1" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", "aws-smithy-json", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-types", "bytes 1.4.0", "http", + "regex", "tokio-stream", "tower", + "url", ] [[package]] name = "aws-sdk-sts" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdfcf584297c666f6b472d5368a78de3bc714b6e0a53d7fbf76c3e347c292ab1" +checksum = "a70adf3e9518c8d6d14f1239f6af04c019ffd260ab791e17deb11f1bce6a9f76" dependencies = [ + "aws-credential-types", "aws-endpoint", "aws-http", "aws-sig-auth", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-json", "aws-smithy-query", - "aws-smithy-types 0.51.0", + "aws-smithy-types", "aws-smithy-xml", "aws-types", "bytes 1.4.0", "http", + "regex", "tower", + "tracing 0.1.37", + "url", ] [[package]] name = "aws-sig-auth" -version = "0.51.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cbe7b2be9e185c1fbce27fc9c41c66b195b32d89aa099f98768d9544221308" +checksum = "22af7f6515f8b51dabef87df1d901c9734e4e367791c6d0e1082f9f31528120e" dependencies = [ - "aws-sigv4 0.51.0", + "aws-credential-types", + "aws-sigv4", "aws-smithy-eventstream", - "aws-smithy-http 0.51.0", + "aws-smithy-http", "aws-types", "http", "tracing 0.1.37", ] -[[package]] -name = "aws-sigv4" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ff4cff8c4a101962d593ba94e72cd83891aecd423f0c6e3146bff6fb92c9e3" -dependencies = [ - "aws-smithy-eventstream", - "aws-smithy-http 0.51.0", - "bytes 1.4.0", - "form_urlencoded", - "hex", - "http", - "once_cell", - "percent-encoding", - "regex", - "ring", - "time", - "tracing 0.1.37", -] - [[package]] name = "aws-sigv4" version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eee0d796882321e91ca7b991ab6193864e04b605be3a6c18adb9134a90d5a860" dependencies = [ - "aws-smithy-http 0.53.1", + "aws-smithy-eventstream", + "aws-smithy-http", + "bytes 1.4.0", "form_urlencoded", "hex", "hmac", @@ -911,9 +941,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3442b4c5d3fc39891a2e5e625735fba6b24694887d49c6518460fde98247a9" +checksum = "d8b9900be224962d65a626072d8777f847ae5406c07547f0dc14c60048978c4b" dependencies = [ "futures-util", "pin-project-lite", @@ -923,12 +953,12 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc227e36e346f45298288359f37123e1a92628d1cec6b11b5eb335553278bd9e" +checksum = "85e9e4d3c2296bcec2c03f9f769ac9b2424d972c2fe7afc0b59235447ac3a5c3" dependencies = [ - "aws-smithy-http 0.51.0", - "aws-smithy-types 0.51.0", + "aws-smithy-http", + "aws-smithy-types", "bytes 1.4.0", "crc32c", "crc32fast", @@ -944,20 +974,21 @@ dependencies = [ [[package]] name = "aws-smithy-client" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff28d553714f8f54cd921227934fc13a536a1c03f106e56b362fd57e16d450ad" +checksum = "710ca0f8dacddda5fbcaf5c3cd9d02da7913fd463a2ee9555b617bf168bedacb" dependencies = [ "aws-smithy-async", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.51.0", - "aws-smithy-types 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-types", "bytes 1.4.0", "fastrand", "http", "http-body", "hyper", - "hyper-tls", + "hyper-rustls", + "lazy_static", "pin-project-lite", "tokio", "tower", @@ -966,63 +997,23 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7ea0df7161ce65b5c8ca6eb709a1a907376fa18226976e41c748ce02ccccf24" +checksum = "8d1ff11ee22de3581114b60d4ae8e700638dacb5b5bbe6769726e251e6c3f20a" dependencies = [ - "aws-smithy-types 0.51.0", + "aws-smithy-types", "bytes 1.4.0", "crc32fast", ] -[[package]] -name = "aws-smithy-http" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf58ed4fefa61dbf038e5421a521cbc2c448ef69deff0ab1d915d8a10eda5664" -dependencies = [ - "aws-smithy-eventstream", - "aws-smithy-types 0.51.0", - "bytes 1.4.0", - "bytes-utils", - "futures-core", - "http", - "http-body", - "hyper", - "once_cell", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing 0.1.37", -] - [[package]] name = "aws-smithy-http" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29dcab29afbea7726f5c10c7be0c38666d7eb07db551580b3b26ed7cfb5d1935" dependencies = [ - "aws-smithy-types 0.53.1", - "bytes 1.4.0", - "bytes-utils", - "futures-core", - "http", - "http-body", - "hyper", - "once_cell", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing 0.1.37", -] - -[[package]] -name = "aws-smithy-http" -version = "0.54.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd86f48d7e36fb24ee922d04d79c8353e01724b1c38757ed92593179223aa7" -dependencies = [ - "aws-smithy-types 0.54.1", + "aws-smithy-eventstream", + "aws-smithy-types", "bytes 1.4.0", "bytes-utils", "futures-core", @@ -1038,27 +1029,12 @@ dependencies = [ [[package]] name = "aws-smithy-http-tower" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c96d7bd35e7cf96aca1134b2f81b1b59ffe493f7c6539c051791cbbf7a42d3" -dependencies = [ - "aws-smithy-http 0.51.0", - "bytes 1.4.0", - "http", - "http-body", - "pin-project-lite", - "tower", - "tracing 0.1.37", -] - -[[package]] -name = "aws-smithy-http-tower" -version = "0.54.1" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8972d1b4ae3aba1a10e7106fed53a5a36bc8ef86170a84f6ddd33d36fac12ad" +checksum = "f5856d2f1063c0f726a85f32dcd2a9f5a1d994eb27b156abccafc7260f3f471d" dependencies = [ - "aws-smithy-http 0.54.1", - "aws-smithy-types 0.54.1", + "aws-smithy-http", + "aws-smithy-types", "bytes 1.4.0", "http", "http-body", @@ -1069,35 +1045,23 @@ dependencies = [ [[package]] name = "aws-smithy-json" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8324ba98c8a94187723cc16c37aefa09504646ee65c3d2c3af495bab5ea701b" +checksum = "dfb33659b68480495b5f906b946c8642928440118b1d7e26a25a067303ca01a5" dependencies = [ - "aws-smithy-types 0.51.0", + "aws-smithy-types", ] [[package]] name = "aws-smithy-query" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83834ed2ff69ea6f6657baf205267dc2c0abe940703503a3e5d60ce23be3d306" +checksum = "9c4b21ee0e30ff046e87c7b7e017b99d445b42a81fe52c6e5139b23b795a98ae" dependencies = [ - "aws-smithy-types 0.51.0", + "aws-smithy-types", "urlencoding", ] -[[package]] -name = "aws-smithy-types" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b02e06ea63498c43bc0217ea4d16605d4e58d85c12fc23f6572ff6d0a840c61" -dependencies = [ - "itoa 1.0.4", - "num-integer", - "ryu", - "time", -] - [[package]] name = "aws-smithy-types" version = "0.53.1" @@ -1111,42 +1075,29 @@ dependencies = [ "time", ] -[[package]] -name = "aws-smithy-types" -version = "0.54.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da7e499c4b15bab8eb6b234df31833cc83a1bdaa691ba72d5d81efc109d9d705" -dependencies = [ - "base64-simd", - "itoa 1.0.4", - "num-integer", - "ryu", - "time", -] - [[package]] name = "aws-smithy-xml" -version = "0.51.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246e9f83dd1fdf5d347fa30ae4ad30a9d1d42ce4cd74a93d94afa874646f94cd" +checksum = "6d27bfaa164aa94aac721726a83aa78abe708a275e88a573e103b4961c5f0ede" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "0.51.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05701d32da168b44f7ee63147781aed8723e792cc131cb9b18363b5393f17f70" +checksum = "61f00f4b0cdd345686e6389f3343a3020f93232d20040802b87673ddc2d02956" dependencies = [ + "aws-credential-types", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-types 0.51.0", + "aws-smithy-http", + "aws-smithy-types", "http", "rustc_version 0.4.0", "tracing 0.1.37", - "zeroize", ] [[package]] @@ -9092,6 +9043,7 @@ dependencies = [ "async-trait", "atty", "aws-config", + "aws-credential-types", "aws-sdk-cloudwatch", "aws-sdk-cloudwatchlogs", "aws-sdk-elasticsearch", @@ -9099,12 +9051,12 @@ dependencies = [ "aws-sdk-kinesis", "aws-sdk-s3", "aws-sdk-sqs", - "aws-sigv4 0.53.0", + "aws-sigv4", "aws-smithy-async", "aws-smithy-client", - "aws-smithy-http 0.51.0", - "aws-smithy-http-tower 0.54.1", - "aws-smithy-types 0.51.0", + "aws-smithy-http", + "aws-smithy-http-tower", + "aws-smithy-types", "aws-types", "axum", "azure_core", diff --git a/Cargo.toml b/Cargo.toml index d80cf43c47f89..298effc91f5fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -168,21 +168,22 @@ metrics = "0.20.1" metrics-tracing-context = { version = "0.12.0", default-features = false } # AWS - Official SDK -aws-sdk-s3 = { version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-sdk-sqs = { version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-sdk-cloudwatch = { version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-sdk-cloudwatchlogs = { version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-sdk-elasticsearch = {version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-sdk-firehose = { version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-sdk-kinesis = { version = "0.21.0", default-features = false, features = ["native-tls"], optional = true } -aws-types = { version = "0.51.0", default-features = false, features = ["hardcoded-credentials"], optional = true } +aws-sdk-s3 = { version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-sdk-sqs = { version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-sdk-cloudwatch = { version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-sdk-cloudwatchlogs = { version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-sdk-elasticsearch = {version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-sdk-firehose = { version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-sdk-kinesis = { version = "0.23.0", default-features = false, features = ["native-tls"], optional = true } +aws-types = { version = "0.53.0", default-features = false, optional = true } aws-sigv4 = { version = "0.53.0", default-features = false, features = ["sign-http"], optional = true } -aws-config = { version = "0.51.0", default-features = false, features = ["native-tls"], optional = true } -aws-smithy-async = { version = "0.51.0", default-features = false, optional = true } -aws-smithy-client = { version = "0.51.0", default-features = false, features = ["client-hyper"], optional = true} -aws-smithy-http = { version = "0.51.0", default-features = false, features = ["event-stream"], optional = true } -aws-smithy-http-tower = { version = "0.54.1", default-features = false, optional = true } -aws-smithy-types = { version = "0.51.0", default-features = false, optional = true } +aws-config = { version = "0.53.0", default-features = false, features = ["native-tls"], optional = true } +aws-credential-types = { version = "0.53.0", default-features = false, features = ["hardcoded-credentials"], optional = true } +aws-smithy-async = { version = "0.53.1", default-features = false, optional = true } +aws-smithy-client = { version = "0.53.1", default-features = false, features = ["client-hyper"], optional = true} +aws-smithy-http = { version = "0.53.1", default-features = false, features = ["event-stream"], optional = true } +aws-smithy-http-tower = { version = "0.53.1", default-features = false, optional = true } +aws-smithy-types = { version = "0.53.1", default-features = false, optional = true } # Azure azure_core = { git = "https://github.com/Azure/azure-sdk-for-rust.git", rev = "b4544d4920fa3064eb921340054cd9cc130b7664", default-features = false, features = ["enable_reqwest"], optional = true } @@ -439,6 +440,7 @@ api-client = [ aws-core = [ "aws-config", + "dep:aws-credential-types", "dep:aws-sigv4", "dep:aws-types", "dep:aws-smithy-async", diff --git a/scripts/integration/aws/compose.yaml b/scripts/integration/aws/compose.yaml index 41f72695c4a01..599226f8397ee 100644 --- a/scripts/integration/aws/compose.yaml +++ b/scripts/integration/aws/compose.yaml @@ -7,6 +7,7 @@ services: image: docker.io/localstack/localstack-full:0.11.6 environment: - SERVICES=kinesis,s3,cloudwatch,elasticsearch,es,firehose,sqs + - DEBUG=1 mock-watchlogs: image: docker.io/luciofranco/mockwatchlogs:latest mock-ecs: diff --git a/src/aws/auth.rs b/src/aws/auth.rs index 31b8e55d764a9..ea0071356553a 100644 --- a/src/aws/auth.rs +++ b/src/aws/auth.rs @@ -3,7 +3,9 @@ use std::time::Duration; use aws_config::{ default_provider::credentials::DefaultCredentialsChain, imds, sts::AssumeRoleProviderBuilder, }; -use aws_types::{credentials::SharedCredentialsProvider, region::Region, Credentials}; +use aws_credential_types::provider::SharedCredentialsProvider; +use aws_credential_types::Credentials; +use aws_types::region::Region; use serde_with::serde_as; use vector_common::sensitive_string::SensitiveString; use vector_config::configurable_component; diff --git a/src/aws/mod.rs b/src/aws/mod.rs index d0fd1894166df..9718ef402af0a 100644 --- a/src/aws/mod.rs +++ b/src/aws/mod.rs @@ -1,6 +1,7 @@ pub mod auth; pub mod region; +use std::error::Error; use std::future::Future; use std::pin::Pin; use std::sync::atomic::{AtomicUsize, Ordering}; @@ -10,22 +11,23 @@ use std::time::{Duration, SystemTime}; pub use auth::{AwsAuthentication, ImdsAuthentication}; use aws_config::meta::region::ProvideRegion; +use aws_credential_types::provider::{ProvideCredentials, SharedCredentialsProvider}; use aws_sigv4::http_request::{SignableRequest, SigningSettings}; use aws_sigv4::SigningParams; use aws_smithy_async::rt::sleep::{AsyncSleep, Sleep}; use aws_smithy_client::bounds::SmithyMiddleware; use aws_smithy_client::erase::{DynConnector, DynMiddleware}; use aws_smithy_client::{Builder, SdkError}; -use aws_smithy_http::callback::BodyCallback; -use aws_smithy_http::endpoint::Endpoint; -use aws_smithy_http::event_stream::BoxError; +use aws_smithy_http::body::{BoxBody, SdkBody}; use aws_smithy_http::operation::{Request, Response}; use aws_smithy_types::retry::RetryConfig; -use aws_types::credentials::{ProvideCredentials, SharedCredentialsProvider}; use aws_types::region::Region; use aws_types::SdkConfig; use bytes::Bytes; +use http::HeaderMap; +use http_body::Body; use once_cell::sync::OnceCell; +use pin_project::pin_project; use regex::RegexSet; pub use region::RegionOrEndpoint; use tower::{Layer, Service, ServiceBuilder}; @@ -41,41 +43,48 @@ pub fn is_retriable_error(error: &SdkError) -> bool { match error { SdkError::TimeoutError(_) | SdkError::DispatchFailure(_) => true, SdkError::ConstructionFailure(_) => false, - SdkError::ResponseError { err: _, raw } | SdkError::ServiceError { err: _, raw } => { - // This header is a direct indication that we should retry the request. Eventually it'd - // be nice to actually schedule the retry after the given delay, but for now we just - // check that it contains a positive value. - let retry_header = raw.http().headers().get("x-amz-retry-after").is_some(); - - // Certain 400-level responses will contain an error code indicating that the request - // should be retried. Since we don't retry 400-level responses by default, we'll look - // for these specifically before falling back to more general heuristics. Because AWS - // services use a mix of XML and JSON response bodies and the AWS SDK doesn't give us - // a parsed representation, we resort to a simple string match. - // - // S3: RequestTimeout - // SQS: RequestExpired, ThrottlingException - // ECS: RequestExpired, ThrottlingException - // Kinesis: RequestExpired, ThrottlingException - // Cloudwatch: RequestExpired, ThrottlingException - // - // Now just look for those when it's a client_error - let re = RETRIABLE_CODES.get_or_init(|| { - RegexSet::new(["RequestTimeout", "RequestExpired", "ThrottlingException"]) - .expect("invalid regex") - }); - - let status = raw.http().status(); - let response_body = String::from_utf8_lossy(raw.http().body().bytes().unwrap_or(&[])); - - retry_header - || status.is_server_error() - || status == http::StatusCode::TOO_MANY_REQUESTS - || (status.is_client_error() && re.is_match(response_body.as_ref())) + SdkError::ResponseError(err) => check_response(err.raw()), + SdkError::ServiceError(err) => check_response(err.raw()), + _ => { + warn!("AWS returned an unhandled error, retrying request."); + true } } } +fn check_response(res: &Response) -> bool { + // This header is a direct indication that we should retry the request. Eventually it'd + // be nice to actually schedule the retry after the given delay, but for now we just + // check that it contains a positive value. + let retry_header = res.http().headers().get("x-amz-retry-after").is_some(); + + // Certain 400-level responses will contain an error code indicating that the request + // should be retried. Since we don't retry 400-level responses by default, we'll look + // for these specifically before falling back to more general heuristics. Because AWS + // services use a mix of XML and JSON response bodies and the AWS SDK doesn't give us + // a parsed representation, we resort to a simple string match. + // + // S3: RequestTimeout + // SQS: RequestExpired, ThrottlingException + // ECS: RequestExpired, ThrottlingException + // Kinesis: RequestExpired, ThrottlingException + // Cloudwatch: RequestExpired, ThrottlingException + // + // Now just look for those when it's a client_error + let re = RETRIABLE_CODES.get_or_init(|| { + RegexSet::new(["RequestTimeout", "RequestExpired", "ThrottlingException"]) + .expect("invalid regex") + }); + + let status = res.http().status(); + let response_body = String::from_utf8_lossy(res.http().body().bytes().unwrap_or(&[])); + + retry_header + || status.is_server_error() + || status == http::StatusCode::TOO_MANY_REQUESTS + || (status.is_client_error() && re.is_match(response_body.as_ref())) +} + pub trait ClientBuilder { type Config; type Client; @@ -134,7 +143,7 @@ pub async fn resolve_region(region: Option) -> crate::Result { pub async fn create_client( auth: &AwsAuthentication, region: Option, - endpoint: Option, + endpoint: Option, proxy: &ProxyConfig, tls_options: &Option, is_sink: bool, @@ -152,7 +161,7 @@ pub async fn create_client( .retry_config(retry_config.clone()); if let Some(endpoint_override) = endpoint { - config_builder = config_builder.endpoint_resolver(endpoint_override); + config_builder = config_builder.endpoint_url(endpoint_override); } let config = config_builder.build(); @@ -245,16 +254,31 @@ where self.inner.poll_ready(cx) } - fn call(&mut self, mut req: Request) -> Self::Future { + fn call(&mut self, req: Request) -> Self::Future { // Attach a body callback that will capture the bytes sent by interrogating the body chunks that get read as it // sends the request out over the wire. We'll read the shared atomic counter, which will contain the number of // bytes "read", aka the bytes it actually sent, if and only if we get back a successful response. - let maybe_bytes_sent = self.enabled.then(|| { - let (callback, shared_bytes_sent) = BodyCaptureCallback::new(); - req.http_mut().body_mut().with_callback(Box::new(callback)); - shared_bytes_sent - }); + let (req, maybe_bytes_sent) = if self.enabled { + let shared_bytes_sent = Arc::new(AtomicUsize::new(0)); + let (request, properties) = req.into_parts(); + let (parts, body) = request.into_parts(); + + let body = { + let shared_bytes_sent = Arc::clone(&shared_bytes_sent); + + body.map(move |body| { + let body = MeasuredBody::new(body, Arc::clone(&shared_bytes_sent)); + SdkBody::from_dyn(BoxBody::new(body)) + }) + }; + + let req = Request::from_parts(http::Request::from_parts(parts, body), properties); + + (req, Some(shared_bytes_sent)) + } else { + (req, None) + }; let region = self.region.clone(); let fut = self.inner.call(req); @@ -283,69 +307,49 @@ where } } -struct BodyCaptureCallback { - bytes_sent: usize, +#[pin_project] +struct MeasuredBody { + #[pin] + inner: SdkBody, shared_bytes_sent: Arc, } -impl BodyCaptureCallback { - fn new() -> (Self, Arc) { - let shared_bytes_sent = Arc::new(AtomicUsize::new(0)); - - ( - Self { - bytes_sent: 0, - shared_bytes_sent: Arc::clone(&shared_bytes_sent), - }, +impl MeasuredBody { + fn new(body: SdkBody, shared_bytes_sent: Arc) -> Self { + Self { + inner: body, shared_bytes_sent, - ) + } } } -impl BodyCallback for BodyCaptureCallback { - fn update(&mut self, bytes: &[u8]) -> Result<(), BoxError> { - // This gets called every time a chunk is read from the request body, which includes both static chunks and - // streaming bodies. Just add the chunk's length to our running tally. - self.bytes_sent += bytes.len(); - Ok(()) - } +impl Body for MeasuredBody { + type Data = Bytes; + type Error = Box; - fn trailers(&self) -> Result>, BoxError> { - Ok(None) - } + fn poll_data( + self: Pin<&mut Self>, + cx: &mut Context<'_>, + ) -> Poll>> { + let this = self.project(); - fn make_new(&self) -> Box { - // We technically don't use retries within the AWS side of the API clients, but we have to satisfy this trait - // method, because `aws_smithy_http` uses the retry layer from `tower`, which clones the request regardless - // before it even executes the first attempt... so there's no reason not to make it technically correct. - Box::new(Self { - bytes_sent: 0, - shared_bytes_sent: Arc::clone(&self.shared_bytes_sent), - }) + match this.inner.poll_data(cx) { + Poll::Ready(Some(Ok(data))) => { + this.shared_bytes_sent + .fetch_add(data.len(), Ordering::Release); + + Poll::Ready(Some(Ok(data))) + } + Poll::Ready(None) => Poll::Ready(None), + Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e))), + Poll::Pending => Poll::Pending, + } } -} -impl Drop for BodyCaptureCallback { - fn drop(&mut self) { - // This is where we actually emit. We specifically emit here, and not in `trailers`, because despite the - // documentation that `trailers` is called after all chunks of the body are successfully read, `hyper` won't - // continue polling a body if it knows it's gotten all the available bytes i.e. it doesn't necessarily drive it - // until `poll_data` returns `None`. This means the only consistent place to know that the body is "done" is - // when it's dropped. - // - // We update our shared atomic counter with the total bytes sent that we accumulated, and it will read the - // atomic if the response indicates that the request was successful. Since we know the body will go out-of-scope - // before a response can possibly be generated, we know the atomic will in turn be updated before it is read. - // - // This design also copes with the fact that, technically, `aws_smithy_client` supports retries and could clone - // this callback for each copy of the request... which it already does at least once per request since the retry - // middleware has to clone the request before trying it. As requests are retried sequentially, only after the - // previous attempt failed, we know that we'll end up in a "last write wins" scenario, so this is still sound. - // - // In the future, we may track every single byte sent in order to generate "raw bytes over the wire, regardless - // of status" metrics, but right now, this is purely "how many bytes have we sent as part of _successful_ - // sends?" - self.shared_bytes_sent - .store(self.bytes_sent, Ordering::Release); + fn poll_trailers( + self: Pin<&mut Self>, + _cx: &mut Context<'_>, + ) -> Poll, Self::Error>> { + Poll::Ready(Ok(None)) } } diff --git a/src/aws/region.rs b/src/aws/region.rs index 1bb0abf9647f2..33c0c1f8cd4dd 100644 --- a/src/aws/region.rs +++ b/src/aws/region.rs @@ -1,8 +1,4 @@ -use std::str::FromStr; - -use aws_smithy_http::endpoint::Endpoint; use aws_types::region::Region; -use http::Uri; use vector_config::configurable_component; /// Configuration of the region/endpoint to use when interacting with an AWS service. @@ -36,9 +32,9 @@ impl RegionOrEndpoint { } } - pub fn endpoint(&self) -> crate::Result> { - let uri = self.endpoint.as_deref().map(Uri::from_str).transpose()?; - Ok(uri.map(Endpoint::immutable)) + pub fn endpoint(&self) -> crate::Result> { + let endpoint = self.endpoint.clone(); + Ok(endpoint) } pub fn region(&self) -> Option { diff --git a/src/common/s3.rs b/src/common/s3.rs index 4376908f9c6ea..c8eb80572a412 100644 --- a/src/common/s3.rs +++ b/src/common/s3.rs @@ -12,6 +12,10 @@ impl ClientBuilder for S3ClientBuilder { } fn build(client: aws_smithy_client::Client, config: &aws_types::SdkConfig) -> Self::Client { - aws_sdk_s3::client::Client::with_config(client, config.into()) + let config = aws_sdk_s3::config::Builder::from(config) + .force_path_style(true) + .build(); + + aws_sdk_s3::client::Client::with_config(client, config) } } diff --git a/src/sinks/aws_cloudwatch_logs/integration_tests.rs b/src/sinks/aws_cloudwatch_logs/integration_tests.rs index 5a585bca931e0..57a13ca17e180 100644 --- a/src/sinks/aws_cloudwatch_logs/integration_tests.rs +++ b/src/sinks/aws_cloudwatch_logs/integration_tests.rs @@ -2,14 +2,11 @@ #![cfg(test)] use std::convert::TryFrom; -use std::str::FromStr; use aws_sdk_cloudwatchlogs::Client as CloudwatchLogsClient; -use aws_sdk_cloudwatchlogs::{Endpoint, Region}; use chrono::Duration; use codecs::TextSerializerConfig; use futures::{stream, StreamExt}; -use http::Uri; use similar_asserts::assert_eq; use super::*; @@ -451,11 +448,9 @@ async fn cloudwatch_healthcheck() { async fn create_client_test() -> CloudwatchLogsClient { let auth = AwsAuthentication::test_auth(); - let region = Some(Region::new("localstack")); + let region = Some(aws_types::region::Region::new("localstack")); let watchlogs_address = watchlogs_address(); - let endpoint = Some(Endpoint::immutable( - Uri::from_str(&watchlogs_address).unwrap(), - )); + let endpoint = Some(watchlogs_address); let proxy = ProxyConfig::default(); create_client::(&auth, region, endpoint, &proxy, &None, true) diff --git a/src/sinks/aws_cloudwatch_logs/request.rs b/src/sinks/aws_cloudwatch_logs/request.rs index 6e7ff7397a620..f9e6dbef53337 100644 --- a/src/sinks/aws_cloudwatch_logs/request.rs +++ b/src/sinks/aws_cloudwatch_logs/request.rs @@ -101,9 +101,9 @@ impl Future for CloudwatchFuture { let response = match ready!(fut.poll_unpin(cx)) { Ok(response) => response, Err(err) => { - if let SdkError::ServiceError { err, raw: _ } = &err { + if let SdkError::ServiceError(inner) = &err { if let DescribeLogStreamsErrorKind::ResourceNotFoundException(_) = - err.kind + inner.err().kind { if self.create_missing_group { info!("Log group provided does not exist; creating a new one."); @@ -148,8 +148,8 @@ impl Future for CloudwatchFuture { Ok(_) => {} Err(err) => { let resource_already_exists = match &err { - SdkError::ServiceError { err, raw: _ } => matches!( - err.kind, + SdkError::ServiceError(inner) => matches!( + inner.err().kind, CreateLogGroupErrorKind::ResourceAlreadyExistsException(_) ), _ => false, @@ -173,8 +173,8 @@ impl Future for CloudwatchFuture { Ok(_) => {} Err(err) => { let resource_already_exists = match &err { - SdkError::ServiceError { err, raw: _ } => matches!( - err.kind, + SdkError::ServiceError(inner) => matches!( + inner.err().kind, CreateLogStreamErrorKind::ResourceAlreadyExistsException(_) ), _ => false, @@ -237,10 +237,10 @@ impl Client { .log_group_name(group_name) .log_stream_name(stream_name) .build() - .map_err(|err| SdkError::ConstructionFailure(err.into()))? + .map_err(SdkError::construction_failure)? .make_operation(cw_client.conf()) .await - .map_err(|err| SdkError::ConstructionFailure(err.into()))?; + .map_err(SdkError::construction_failure)?; let (req, parts) = op.into_request_response(); let (mut body, props) = req.into_parts(); @@ -249,9 +249,9 @@ impl Client { let owned_value = value.clone(); body.headers_mut().insert( http::header::HeaderName::from_bytes(owned_header.as_bytes()) - .map_err(|err| SdkError::ConstructionFailure(err.into()))?, + .map_err(SdkError::construction_failure)?, http::HeaderValue::from_str(owned_value.as_str()) - .map_err(|err| SdkError::ConstructionFailure(err.into()))?, + .map_err(SdkError::construction_failure)?, ); } client diff --git a/src/sinks/aws_cloudwatch_logs/retry.rs b/src/sinks/aws_cloudwatch_logs/retry.rs index f3a03e48645e4..98b2115bafb0e 100644 --- a/src/sinks/aws_cloudwatch_logs/retry.rs +++ b/src/sinks/aws_cloudwatch_logs/retry.rs @@ -36,7 +36,8 @@ impl RetryLogic for CloudwatchRetryLogic { fn is_retriable_error(&self, error: &Self::Error) -> bool { match error { CloudwatchError::Put(err) => { - if let SdkError::ServiceError { err, raw: _ } = err { + if let SdkError::ServiceError(inner) = err { + let err = inner.err(); if let PutLogEventsErrorKind::ServiceUnavailableException(_) = err.kind { return true; } @@ -44,7 +45,8 @@ impl RetryLogic for CloudwatchRetryLogic { is_retriable_error(err) } CloudwatchError::Describe(err) => { - if let SdkError::ServiceError { err, raw: _ } = err { + if let SdkError::ServiceError(inner) = err { + let err = inner.err(); if let DescribeLogStreamsErrorKind::ServiceUnavailableException(_) = err.kind { return true; } @@ -52,7 +54,8 @@ impl RetryLogic for CloudwatchRetryLogic { is_retriable_error(err) } CloudwatchError::CreateStream(err) => { - if let SdkError::ServiceError { err, raw: _ } = err { + if let SdkError::ServiceError(inner) = err { + let err = inner.err(); if let CreateLogStreamErrorKind::ServiceUnavailableException(_) = err.kind { return true; } @@ -66,7 +69,7 @@ impl RetryLogic for CloudwatchRetryLogic { #[cfg(test)] mod test { - use aws_sdk_cloudwatchlogs::error::{PutLogEventsError, PutLogEventsErrorKind}; + use aws_sdk_cloudwatchlogs::error::PutLogEventsError; use aws_sdk_cloudwatchlogs::types::SdkError; use aws_smithy_http::body::SdkBody; use aws_smithy_http::operation::Response; @@ -89,13 +92,10 @@ mod test { *http_response.status_mut() = http::StatusCode::BAD_REQUEST; let raw = Response::new(http_response); - let err = CloudwatchError::Put(SdkError::ServiceError { - err: PutLogEventsError::new( - PutLogEventsErrorKind::Unhandled(Box::new(meta_err.clone())), - meta_err, - ), + let err = CloudwatchError::Put(SdkError::service_error( + PutLogEventsError::unhandled(meta_err), raw, - }); + )); assert!(retry_logic.is_retriable_error(&err)); } } diff --git a/src/sinks/aws_kinesis/firehose/config.rs b/src/sinks/aws_kinesis/firehose/config.rs index 8255c6bf220bd..68d110980ebe5 100644 --- a/src/sinks/aws_kinesis/firehose/config.rs +++ b/src/sinks/aws_kinesis/firehose/config.rs @@ -174,8 +174,8 @@ impl RetryLogic for KinesisRetryLogic { type Response = KinesisResponse; fn is_retriable_error(&self, error: &Self::Error) -> bool { - if let SdkError::ServiceError { err, raw: _ } = error { - if let PutRecordBatchErrorKind::ServiceUnavailableException(_) = err.kind { + if let SdkError::ServiceError(inner) = error { + if let PutRecordBatchErrorKind::ServiceUnavailableException(_) = inner.err().kind { return true; } } diff --git a/src/sinks/aws_kinesis/firehose/integration_tests.rs b/src/sinks/aws_kinesis/firehose/integration_tests.rs index 71a992b326246..1befa16715cb9 100644 --- a/src/sinks/aws_kinesis/firehose/integration_tests.rs +++ b/src/sinks/aws_kinesis/firehose/integration_tests.rs @@ -148,6 +148,7 @@ async fn firehose_client() -> aws_sdk_firehose::Client { /// creates ES domain with the given name and returns the ARN async fn ensure_elasticsearch_domain(domain_name: String) -> String { + let endpoint = test_region_endpoint().endpoint().unwrap().unwrap(); let client = EsClient::from_conf( aws_sdk_elasticsearch::config::Builder::new() .credentials_provider( @@ -156,7 +157,7 @@ async fn ensure_elasticsearch_domain(domain_name: String) -> String { .await .unwrap(), ) - .endpoint_resolver(test_region_endpoint().endpoint().unwrap().unwrap()) + .endpoint_url(endpoint) .region(test_region_endpoint().region()) .build(), ); diff --git a/src/sinks/aws_kinesis/streams/config.rs b/src/sinks/aws_kinesis/streams/config.rs index 47c96b9ccbff3..0398ba9ff4624 100644 --- a/src/sinks/aws_kinesis/streams/config.rs +++ b/src/sinks/aws_kinesis/streams/config.rs @@ -180,8 +180,9 @@ impl RetryLogic for KinesisRetryLogic { type Response = KinesisResponse; fn is_retriable_error(&self, error: &Self::Error) -> bool { - if let SdkError::ServiceError { err, raw: _ } = error { - if let PutRecordsErrorKind::ProvisionedThroughputExceededException(_) = err.kind { + if let SdkError::ServiceError(inner) = error { + if let PutRecordsErrorKind::ProvisionedThroughputExceededException(_) = inner.err().kind + { return true; } } diff --git a/src/sinks/aws_s3/integration_tests.rs b/src/sinks/aws_s3/integration_tests.rs index 4f3a698118b79..3af59346b7469 100644 --- a/src/sinks/aws_s3/integration_tests.rs +++ b/src/sinks/aws_s3/integration_tests.rs @@ -423,7 +423,7 @@ async fn create_bucket(bucket: &str, object_lock_enabled: bool) { { Ok(_) => {} Err(err) => match err { - SdkError::ServiceError { err, raw: _ } => match err.kind { + SdkError::ServiceError(inner) => match &inner.err().kind { CreateBucketErrorKind::BucketAlreadyOwnedByYou(_) => {} err => panic!("Failed to create bucket: {:?}", err), }, diff --git a/src/sinks/aws_sqs/integration_tests.rs b/src/sinks/aws_sqs/integration_tests.rs index 7726844f2e073..54b9a007ea61b 100644 --- a/src/sinks/aws_sqs/integration_tests.rs +++ b/src/sinks/aws_sqs/integration_tests.rs @@ -1,11 +1,9 @@ #![cfg(all(test, feature = "aws-sqs-integration-tests"))] use std::collections::HashMap; -use std::str::FromStr; -use aws_sdk_sqs::{model::QueueAttributeName, Client as SqsClient, Endpoint, Region}; +use aws_sdk_sqs::{model::QueueAttributeName, Client as SqsClient}; use codecs::TextSerializerConfig; -use http::Uri; use tokio::time::{sleep, Duration}; use super::{config::SqsSinkConfig, sink::SqsSink}; @@ -31,8 +29,8 @@ async fn create_test_client() -> SqsClient { let proxy = ProxyConfig::default(); create_client::( &auth, - Some(Region::new("localstack")), - Some(Endpoint::immutable(Uri::from_str(&endpoint).unwrap())), + Some(aws_types::region::Region::new("localstack")), + Some(endpoint), &proxy, &None, true, diff --git a/src/sinks/elasticsearch/common.rs b/src/sinks/elasticsearch/common.rs index 101a3d590a11a..18d500518fc8f 100644 --- a/src/sinks/elasticsearch/common.rs +++ b/src/sinks/elasticsearch/common.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use aws_types::credentials::SharedCredentialsProvider; +use aws_credential_types::provider::SharedCredentialsProvider; use aws_types::region::Region; use bytes::{Buf, Bytes}; use http::{Response, StatusCode, Uri}; diff --git a/src/sinks/elasticsearch/service.rs b/src/sinks/elasticsearch/service.rs index b205f10f810e6..e73bf85649ac4 100644 --- a/src/sinks/elasticsearch/service.rs +++ b/src/sinks/elasticsearch/service.rs @@ -4,7 +4,7 @@ use std::{ task::{Context, Poll}, }; -use aws_types::credentials::SharedCredentialsProvider; +use aws_credential_types::provider::SharedCredentialsProvider; use aws_types::region::Region; use bytes::Bytes; use futures::future::BoxFuture; diff --git a/src/sinks/prometheus/remote_write.rs b/src/sinks/prometheus/remote_write.rs index c733f344129ef..a59dcfad7bdaa 100644 --- a/src/sinks/prometheus/remote_write.rs +++ b/src/sinks/prometheus/remote_write.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use std::task; -use aws_types::credentials::SharedCredentialsProvider; +use aws_credential_types::provider::SharedCredentialsProvider; use aws_types::region::Region; use bytes::{Bytes, BytesMut}; use futures::{future::BoxFuture, stream, FutureExt, SinkExt}; diff --git a/src/sinks/s3_common/config.rs b/src/sinks/s3_common/config.rs index fd4d85da4e1cf..f528ea9ef6bfb 100644 --- a/src/sinks/s3_common/config.rs +++ b/src/sinks/s3_common/config.rs @@ -260,9 +260,7 @@ impl From for ObjectCannedAcl { S3CannedAcl::AuthenticatedRead => ObjectCannedAcl::AuthenticatedRead, S3CannedAcl::BucketOwnerRead => ObjectCannedAcl::BucketOwnerRead, S3CannedAcl::BucketOwnerFullControl => ObjectCannedAcl::BucketOwnerFullControl, - S3CannedAcl::LogDeliveryWrite => { - ObjectCannedAcl::Unknown("log-delivery-write".to_string()) - } + S3CannedAcl::LogDeliveryWrite => ObjectCannedAcl::from("log-delivery-write"), } } } @@ -301,7 +299,7 @@ pub fn build_healthcheck(bucket: String, client: S3Client) -> crate::Result Ok(()), Err(error) => Err(match error { - SdkError::ServiceError { err: _, raw } => match raw.http().status() { + SdkError::ServiceError(inner) => match inner.raw().http().status() { StatusCode::FORBIDDEN => HealthcheckError::InvalidCredentials.into(), StatusCode::NOT_FOUND => HealthcheckError::UnknownBucket { bucket }.into(), status => HealthcheckError::UnknownStatus { status }.into(), diff --git a/src/sources/aws_sqs/integration_tests.rs b/src/sources/aws_sqs/integration_tests.rs index ee5d793840091..9ec751fb44117 100644 --- a/src/sources/aws_sqs/integration_tests.rs +++ b/src/sources/aws_sqs/integration_tests.rs @@ -1,12 +1,11 @@ #![cfg(feature = "aws-sqs-integration-tests")] #![cfg(test)] -use std::{collections::HashSet, str::FromStr, time::Duration}; +use std::{collections::HashSet, time::Duration}; -use aws_sdk_sqs::{output::CreateQueueOutput, Endpoint}; +use aws_sdk_sqs::output::CreateQueueOutput; use aws_types::region::Region; use futures::StreamExt; -use http::Uri; use tokio::time::timeout; use crate::{ @@ -51,6 +50,7 @@ async fn send_test_events(count: u32, queue_url: &str, client: &aws_sdk_sqs::Cli } async fn get_sqs_client() -> aws_sdk_sqs::Client { + let endpoint = sqs_address().clone(); let config = aws_sdk_sqs::config::Builder::new() .credentials_provider( AwsAuthentication::test_auth() @@ -58,9 +58,7 @@ async fn get_sqs_client() -> aws_sdk_sqs::Client { .await .unwrap(), ) - .endpoint_resolver(Endpoint::immutable( - Uri::from_str(sqs_address().as_str()).unwrap(), - )) + .endpoint_url(endpoint) .region(Some(Region::new("us-east-1"))) .build(); diff --git a/src/sources/aws_sqs/source.rs b/src/sources/aws_sqs/source.rs index 5f17d3326e243..f399a10741ef7 100644 --- a/src/sources/aws_sqs/source.rs +++ b/src/sources/aws_sqs/source.rs @@ -110,7 +110,7 @@ impl SqsSource { .visibility_timeout(self.visibility_timeout_secs as i32) // I think this should be a known attribute // https://github.com/awslabs/aws-sdk-rust/issues/411 - .attribute_names(QueueAttributeName::Unknown(String::from("SentTimestamp"))) + .attribute_names(QueueAttributeName::from("SentTimestamp")) .send() .await;