From 66603908e1699224fe26a93579dd93900c7d92d3 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Mon, 20 Nov 2023 18:49:33 +0000 Subject: [PATCH] chore: update aws-sdk-s3 --- Cargo.lock | 405 ++++++++----------------------- forms/multipart-s3/Cargo.toml | 2 +- forms/multipart-s3/src/client.rs | 2 +- forms/multipart-s3/src/main.rs | 7 +- 4 files changed, 112 insertions(+), 304 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2f2898e2f..cfa3dba7c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1194,19 +1194,19 @@ version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f9625b71b3ee4adbfbca369c6680d156e316ed86d2c7199a2a134563917414" dependencies = [ - "aws-credential-types 0.101.0", - "aws-http 0.59.0", - "aws-runtime 0.101.0", + "aws-credential-types", + "aws-http", + "aws-runtime", "aws-sdk-sso", "aws-sdk-ssooidc", "aws-sdk-sts", - "aws-smithy-async 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-json 0.59.0", - "aws-smithy-runtime 0.101.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "aws-types 0.101.0", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes 1.5.0", "fastrand 2.0.1", "hex", @@ -1219,56 +1219,27 @@ dependencies = [ "zeroize", ] -[[package]] -name = "aws-credential-types" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80009846d61a0a4f9070d789cf0e64db284cba6984fae3871050d044e6569cd2" -dependencies = [ - "aws-smithy-async 0.57.1", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "zeroize", -] - [[package]] name = "aws-credential-types" version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5924466398ac76ffd411d297b9d516dcebb0577f7344c0c15fd8e8e04d9c7895" dependencies = [ - "aws-smithy-async 0.101.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", "zeroize", ] -[[package]] -name = "aws-http" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e65730b741a5f6422fd338bf6f76b7956b090affeaa045e78fca8c4186e0fd5" -dependencies = [ - "aws-smithy-http 0.57.1", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "aws-types 0.57.1", - "bytes 1.5.0", - "http", - "http-body 0.4.5", - "pin-project-lite 0.2.13", - "tracing", -] - [[package]] name = "aws-http" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb9a3aa335a105a00975c971f1dad403c3175f2a210d98f39345c6af53923912" dependencies = [ - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "aws-types 0.101.0", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes 1.5.0", "http", "http-body 0.4.5", @@ -1276,42 +1247,21 @@ dependencies = [ "tracing", ] -[[package]] -name = "aws-runtime" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2414b96071ae840b97c0cc1d44b248d5607d648593cdf474f3fb5465572898" -dependencies = [ - "aws-credential-types 0.57.1", - "aws-http 0.57.1", - "aws-sigv4 0.57.1", - "aws-smithy-async 0.57.1", - "aws-smithy-eventstream", - "aws-smithy-http 0.57.1", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "aws-types 0.57.1", - "fastrand 2.0.1", - "http", - "percent-encoding", - "tracing", - "uuid 1.5.0", -] - [[package]] name = "aws-runtime" version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b75844ecbdf3dc5e0f5ac5fd1088fb1623849990ea9445d2826258ce63be4de5" dependencies = [ - "aws-credential-types 0.101.0", - "aws-http 0.59.0", - "aws-sigv4 0.101.0", - "aws-smithy-async 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "aws-types 0.101.0", + "aws-credential-types", + "aws-http", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-eventstream", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "fastrand 2.0.1", "http", "percent-encoding", @@ -1321,24 +1271,24 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "0.35.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84022763485483ea17d417f9832d5da198bc36829b59f086c0d35ecd2ce59991" +checksum = "39a2ccbd49e784c36d0f0596da681275496f679e249059cae3fa92dd3c2c72e1" dependencies = [ - "aws-credential-types 0.57.1", - "aws-http 0.57.1", - "aws-runtime 0.57.1", - "aws-sigv4 0.57.1", - "aws-smithy-async 0.57.1", + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-sigv4", + "aws-smithy-async", "aws-smithy-checksums", "aws-smithy-eventstream", - "aws-smithy-http 0.57.1", - "aws-smithy-json 0.57.1", - "aws-smithy-runtime 0.57.1", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "aws-smithy-xml 0.57.1", - "aws-types 0.57.1", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", "bytes 1.5.0", "http", "http-body 0.4.5", @@ -1355,16 +1305,16 @@ version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c870aa95e1e85f837f74af2cc937b3f8e72e2315a89e524265875843655b4d47" dependencies = [ - "aws-credential-types 0.101.0", - "aws-http 0.59.0", - "aws-runtime 0.101.0", - "aws-smithy-async 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-json 0.59.0", - "aws-smithy-runtime 0.101.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "aws-types 0.101.0", + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes 1.5.0", "http", "regex", @@ -1377,16 +1327,16 @@ version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "107ee812e46f9120e68d48bf985d2f2a538315bd8be8a3e54db619250cc4c95e" dependencies = [ - "aws-credential-types 0.101.0", - "aws-http 0.59.0", - "aws-runtime 0.101.0", - "aws-smithy-async 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-json 0.59.0", - "aws-smithy-runtime 0.101.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "aws-types 0.101.0", + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-types", "bytes 1.5.0", "http", "regex", @@ -1399,18 +1349,18 @@ version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e3958c43a78f6c3822e62009a35802af5cc7c120fbe8e60b98565604569aae" dependencies = [ - "aws-credential-types 0.101.0", - "aws-http 0.59.0", - "aws-runtime 0.101.0", - "aws-smithy-async 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-json 0.59.0", + "aws-credential-types", + "aws-http", + "aws-runtime", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-json", "aws-smithy-query", - "aws-smithy-runtime 0.101.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "aws-smithy-xml 0.59.0", - "aws-types 0.101.0", + "aws-smithy-runtime", + "aws-smithy-runtime-api", + "aws-smithy-types", + "aws-smithy-xml", + "aws-types", "http", "regex", "tracing", @@ -1418,65 +1368,33 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "0.57.1" +version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3347c738e0a8449020877d319cda56da74d6e8aba9fff210720fac66cae3c7f4" +checksum = "06130e3686db3c5ae2fc44b3516fffe6b4d4eccebe09bd8ccc4067f3c9c183fb" dependencies = [ - "aws-credential-types 0.57.1", + "aws-credential-types", "aws-smithy-eventstream", - "aws-smithy-http 0.57.1", - "aws-smithy-runtime-api 0.57.1", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", "bytes 1.5.0", + "crypto-bigint 0.5.5", "form_urlencoded", "hex", "hmac", "http", - "num-bigint", "once_cell", "p256 0.11.1", "percent-encoding", "regex", "ring 0.17.5", "sha2", + "subtle", "time", "tracing", "zeroize", ] -[[package]] -name = "aws-sigv4" -version = "0.101.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06130e3686db3c5ae2fc44b3516fffe6b4d4eccebe09bd8ccc4067f3c9c183fb" -dependencies = [ - "aws-credential-types 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", - "bytes 1.5.0", - "form_urlencoded", - "hex", - "hmac", - "http", - "once_cell", - "percent-encoding", - "regex", - "sha2", - "time", - "tracing", -] - -[[package]] -name = "aws-smithy-async" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b65a284265d3eec6cc9f1daef2d0cc3b78684b712cb6c7f1d0f665456b7604" -dependencies = [ - "futures-util", - "pin-project-lite 0.2.13", - "tokio 1.34.0", -] - [[package]] name = "aws-smithy-async" version = "0.101.0" @@ -1490,12 +1408,12 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.57.1" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40f1d5a222ba11ac7d6b20f3668ae282970e50615fa5ee1dd8ac8180c0c1803" +checksum = "d293ef76a982c573f7384e30c28f9a2472f8dd5f4ce5abcceb0e909a15098e8e" dependencies = [ - "aws-smithy-http 0.57.1", - "aws-smithy-types 0.57.1", + "aws-smithy-http", + "aws-smithy-types", "bytes 1.5.0", "crc32c", "crc32fast", @@ -1511,44 +1429,24 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.57.1" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16e7ecebc2b083a1b138868a46a343204a6097f343c4830a8b22b3a0d30013e" +checksum = "e1d2c1844aee465dc023924dbe19d730b116eaf3587d7c2a9b4a41f9c4e980ee" dependencies = [ - "aws-smithy-types 0.57.1", + "aws-smithy-types", "bytes 1.5.0", "crc32fast", ] -[[package]] -name = "aws-smithy-http" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715aeb61fb743848d5d398ce6fb1259f5eba5e13dceec5d5064cada1a181d38d" -dependencies = [ - "aws-smithy-eventstream", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "bytes 1.5.0", - "bytes-utils", - "futures-core", - "http", - "http-body 0.4.5", - "once_cell", - "percent-encoding", - "pin-project-lite 0.2.13", - "pin-utils", - "tracing", -] - [[package]] name = "aws-smithy-http" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96daaad925331c72449423574fdc72b54af780d5a23ace3c0a6ad0ccbf378715" dependencies = [ - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", + "aws-smithy-eventstream", + "aws-smithy-runtime-api", + "aws-smithy-types", "bytes 1.5.0", "bytes-utils", "futures-core", @@ -1561,22 +1459,13 @@ dependencies = [ "tracing", ] -[[package]] -name = "aws-smithy-json" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de21d368dcd5cab17033406ea6e7351b091164b208381de837510bd7558c0f30" -dependencies = [ - "aws-smithy-types 0.57.1", -] - [[package]] name = "aws-smithy-json" version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ff985bee3fe21046dc501fadc1d04a1161977c55a0cbbccd9b111c18206aa64" dependencies = [ - "aws-smithy-types 0.101.0", + "aws-smithy-types", ] [[package]] @@ -1585,44 +1474,20 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb4006503693766d34717efc5f58325062845fce26a683a71b70f23156d72e67" dependencies = [ - "aws-smithy-types 0.101.0", + "aws-smithy-types", "urlencoding", ] -[[package]] -name = "aws-smithy-runtime" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4395310662d10f1847324af5fe43e621922cba03b1aa6d26c21096e18a4e79" -dependencies = [ - "aws-smithy-async 0.57.1", - "aws-smithy-http 0.57.1", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "bytes 1.5.0", - "fastrand 2.0.1", - "http", - "http-body 0.4.5", - "hyper 0.14.27", - "hyper-rustls", - "once_cell", - "pin-project-lite 0.2.13", - "pin-utils", - "rustls 0.21.9", - "tokio 1.34.0", - "tracing", -] - [[package]] name = "aws-smithy-runtime" version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d28af854558601b4202a4273b9720aebe43d73e472143e6056f16e3bd90bc837" dependencies = [ - "aws-smithy-async 0.101.0", - "aws-smithy-http 0.59.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", + "aws-smithy-async", + "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", "bytes 1.5.0", "fastrand 2.0.1", "http", @@ -1637,29 +1502,14 @@ dependencies = [ "tracing", ] -[[package]] -name = "aws-smithy-runtime-api" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27594c06f5b36e97d18ef26ed693f1d4c7167b9bbb544b3a9bb653f9f7035" -dependencies = [ - "aws-smithy-async 0.57.1", - "aws-smithy-types 0.57.1", - "bytes 1.5.0", - "http", - "pin-project-lite 0.2.13", - "tokio 1.34.0", - "tracing", -] - [[package]] name = "aws-smithy-runtime-api" version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1c68e17e754b86da350b43add38294189121a880e9c3fb454f83ff7044f5257" dependencies = [ - "aws-smithy-async 0.101.0", - "aws-smithy-types 0.101.0", + "aws-smithy-async", + "aws-smithy-types", "bytes 1.5.0", "http", "pin-project-lite 0.2.13", @@ -1668,29 +1518,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "aws-smithy-types" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d36f1723ed61e82094498e7283510fe21484b73c215c33874c81a84411b5bdc" -dependencies = [ - "base64-simd", - "bytes 1.5.0", - "bytes-utils", - "futures-core", - "http", - "http-body 0.4.5", - "itoa 1.0.9", - "num-integer", - "pin-project-lite 0.2.13", - "pin-utils", - "ryu", - "serde", - "time", - "tokio 1.34.0", - "tokio-util 0.7.10", -] - [[package]] name = "aws-smithy-types" version = "0.101.0" @@ -1710,15 +1537,8 @@ dependencies = [ "ryu", "serde", "time", -] - -[[package]] -name = "aws-smithy-xml" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68225c8d3e3e6c565a3cf764aa82440837ef15c33d1dd7205e15715444e4b4ad" -dependencies = [ - "xmlparser", + "tokio 1.34.0", + "tokio-util 0.7.10", ] [[package]] @@ -1730,31 +1550,16 @@ dependencies = [ "xmlparser", ] -[[package]] -name = "aws-types" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdc27aac60f715bab25f5d758ba5651b80aae791c48e9871ffe298683f00a2b" -dependencies = [ - "aws-credential-types 0.57.1", - "aws-smithy-async 0.57.1", - "aws-smithy-runtime-api 0.57.1", - "aws-smithy-types 0.57.1", - "http", - "rustc_version 0.4.0", - "tracing", -] - [[package]] name = "aws-types" version = "0.101.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61065f0c6070cb0f9aaddfa614605fb1049908481da71ba5b39b2ffca12f57e4" dependencies = [ - "aws-credential-types 0.101.0", - "aws-smithy-async 0.101.0", - "aws-smithy-runtime-api 0.101.0", - "aws-smithy-types 0.101.0", + "aws-credential-types", + "aws-smithy-async", + "aws-smithy-runtime-api", + "aws-smithy-types", "http", "rustc_version 0.4.0", "tracing", @@ -2696,9 +2501,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -3172,7 +2977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.3", + "crypto-bigint 0.5.5", "digest", "ff 0.13.0", "generic-array", diff --git a/forms/multipart-s3/Cargo.toml b/forms/multipart-s3/Cargo.toml index b342b6b25..469bc3dd7 100644 --- a/forms/multipart-s3/Cargo.toml +++ b/forms/multipart-s3/Cargo.toml @@ -9,7 +9,7 @@ actix-web.workspace = true actix-web-lab.workspace = true aws-config = "0.101" -aws-sdk-s3 = "0.35" +aws-sdk-s3 = "0.38" dotenvy.workspace = true env_logger.workspace = true diff --git a/forms/multipart-s3/src/client.rs b/forms/multipart-s3/src/client.rs index 64b40c07a..317a8bdc5 100644 --- a/forms/multipart-s3/src/client.rs +++ b/forms/multipart-s3/src/client.rs @@ -44,7 +44,7 @@ impl Client { Some(( object .content_length() - .try_into() + .map(|len| len.try_into().unwrap()) .expect("file has invalid size"), object.body, )) diff --git a/forms/multipart-s3/src/main.rs b/forms/multipart-s3/src/main.rs index 8e280b371..bbc98cfbf 100644 --- a/forms/multipart-s3/src/main.rs +++ b/forms/multipart-s3/src/main.rs @@ -6,7 +6,7 @@ use actix_web::{ HttpServer, Responder, }; use actix_web_lab::{extract::Path, respond::Html}; -use aws_config::meta::region::RegionProviderChain; +use aws_config::{meta::region::RegionProviderChain, BehaviorVersion}; use dotenvy::dotenv; use serde_json::json; @@ -90,7 +90,10 @@ async fn main() -> std::io::Result<()> { log::info!("configuring S3 client"); let aws_region = RegionProviderChain::default_provider().or_else("us-east-1"); - let aws_config = aws_config::from_env().region(aws_region).load().await; + let aws_config = aws_config::defaults(BehaviorVersion::latest()) + .region(aws_region) + .load() + .await; // create singleton S3 client let s3_client = Client::new(&aws_config);