Skip to content

Commit

Permalink
Rust: Update dependencies, especially Hyper 1.x examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidSouther authored and meyertst-aws committed Nov 11, 2024
1 parent 059e285 commit ba262cb
Show file tree
Hide file tree
Showing 55 changed files with 68 additions and 67 deletions.
2 changes: 1 addition & 1 deletion rustv1/examples/apigateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ aws-sdk-apigateway = { version = "1.3.0" }
aws-smithy-types-convert = { version = "0.60.0", features = [
"convert-chrono",
] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/apigatewaymanagement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-apigatewaymanagement = { version = "1.3.0" }
http = "0.2.5"
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/applicationautoscaling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-applicationautoscaling = { version = "1.4.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/auto-scaling/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ aws-sdk-autoscaling = { version = "1.3.0" }
aws-sdk-ec2 = { version = "1.3.0" }
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
anyhow = "1.0.75"
tracing = "0.1.37"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/autoscalingplans/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ aws-sdk-autoscalingplans = { version = "1.3.0" }
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/batch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-batch = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/cloudformation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-cloudformation = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/cloudwatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-cloudwatch = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/cloudwatchlogs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-cloudwatchlogs = { version = "1.3.0", features = ["test-util"]}
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
chrono = "0.4.32"
tracing = "0.1.40"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/cognitoidentity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ aws-smithy-types-convert = { version = "0.60.0", features = [
"convert-chrono",
] }
chrono = "0.4"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/cognitoidentityprovider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aws-sdk-cognitoidentityprovider = { version = "1.3.0" }
aws-smithy-types-convert = { version = "0.60.0", features = [
"convert-chrono",
] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/cognitosync/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aws-sdk-cognitosync = { version = "1.3.0" }
aws-smithy-types-convert = { version = "0.60.0", features = [
"convert-chrono",
] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/concurrency/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
futures = "0.3.25"
tokio = { version = "1.20.1", features = ["full"] }
tracing = "0.1.37"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-config = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/dynamodb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ aws-sdk-dynamodb = { version = "1.3.0" }
aws-smithy-runtime = { version = "1.0.1", features = ["test-util"] }
aws-smithy-types = { version = "1.0.1" }
axum = "0.5.16"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
futures = "0.3"
http = "0.2.5"
log = "0.4.17"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/ebs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ aws-sdk-ec2 = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
base64 = "0.13.0"
sha2 = "0.9.5"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/ec2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-ec2 = { version = "1.3.0" }
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
tracing = "0.1.40"
aws-smithy-runtime-api = "1.6.2"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/ecr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-ecr = { version = "1.3.0" }
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/ecs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-ecs = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/eks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-eks = { version = "1.3.0" }
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/firehose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-firehose = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }

2 changes: 1 addition & 1 deletion rustv1/examples/globalaccelerator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-globalaccelerator = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
tokio-stream = "0.1.8"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/glue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
tracing = "0.1.37"
async_once = "0.2.6"
lazy_static = "1.4.0"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
thiserror = "1.0.37"
secrecy = "0.8.0"
uuid = { version = "1.2.1", features = ["v4"] }
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/greengrassv2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-greengrassv2 = { version = "1.3.0" }
aws-types = { version = "1.0.1" }
tokio = { version = "1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.5", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/iam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ aws-sdk-s3 = { version = "1.4.0" }
aws-sdk-sts = { version = "1.3.1" }
sdk-examples-test-utils = { path = "../../test-utils" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
uuid = { version = "0.8", features = ["serde", "v4"] }
tower-service = "0.3.2"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/iam/src/bin/iam-getting-started.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ async fn run_iam_operations(
let assumed_role = sts_client
.assume_role()
.role_arn(assume_role_role.arn())
.role_session_name(&format!("{}{}", "iam_demo_assumerole_session_", uuid))
.role_session_name(format!("iam_demo_assumerole_session_{uuid}"))
.send()
.await;
println!("Assumed role: {:?}", assumed_role);
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/iot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-iot = { version = "1.3.0" }
aws-types = { version = "1.0.1" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/kinesis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-kinesis = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/kms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-kms = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
base64 = "0.13.0"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/lambda/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ aws-sdk-lambda = { version = "1.3.0" }
aws-sdk-s3 = { version = "1.4.0" }
aws-smithy-types = { version = "1.0.1" }
aws-types = { version = "1.0.1" }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
tracing = "0.1.37"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/logging/logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ aws-sdk-dynamodb = { version = "1.3.0" }
# snippet-start:[logging.rust.logger-cargo.toml-env_logger]
env_logger = "0.9.0"
# snippet-end:[logging.rust.logger-cargo.toml-env_logger]
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tokio = { version = "1.20.1", features = ["full"] }
# snippet-end:[logging.rust.logger-cargo.toml]
2 changes: 1 addition & 1 deletion rustv1/examples/logging/tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version = "0.1.0"
[dependencies]
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-dynamodb = { version = "1.3.0" }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tokio = { version = "1.20.1", features = ["full"] }
# snippet-start:[logging.rust.tracing-cargo.toml-tracing_subscriber]
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/medialive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-medialive = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/mediapackage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-mediapackage = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/polly/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-polly = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
bytes = "1"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/qldb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ aws-sdk-qldb = { version = "1.3.0" }
aws-sdk-qldbsession = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
tokio-stream = { version = "0.1.9", features = ["default"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/rds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async-trait = "0.1.73"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-smithy-runtime-api = { version = "1.0.1" }
aws-sdk-rds = { version = "1.3.0" }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
inquire = "0.6.2"
mockall = "0.11.4"
phf = { version = "0.11.2", features = ["std", "macros"] }
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/rdsdata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ version = "0.1.0"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-rdsdata = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/route53/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ edition = "2021"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-route53 = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ aws-smithy-types = { version = "1.0.1", features = ["http-body-0-4-x"] }
sdk-examples-test-utils = { path = "../../test-utils" }
anyhow = "1.0.70"
bytes = "1.4.0"
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
futures-util = { version = "0.3.21", features = ["alloc"] }
http = "0.2.8"
http-body = "0.4.5"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/sagemaker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aws-sdk-sagemaker = { version = "1.5.0" }
aws-smithy-types-convert = { version = "0.60.0", features = [
"convert-chrono",
] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
thiserror = "1.0"
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
2 changes: 1 addition & 1 deletion rustv1/examples/sdk-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-credential-types = { version = "1.0.1" }
aws-sdk-s3 = { version = "1.4.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
lazy_static = "1.4.0"
async_once = "0.2.6"
Expand Down
2 changes: 1 addition & 1 deletion rustv1/examples/secretsmanager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ description = "Example usage of the SecretManager service"
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-secretsmanager = { version = "1.3.0" }
tokio = { version = "1.20.1", features = ["full"] }
clap = { version = "~4.4", features = ["derive"] }
clap = { version = "4.4", features = ["derive"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
18 changes: 9 additions & 9 deletions rustv1/examples/sending-presigned-requests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aws-config = { version = "1.0.1", features = ["behavior-version-latest"] }
aws-sdk-s3 = { version = "1.4.0" }
http = "0.2.6"
hyper = "0.14"
reqwest = "0.11"
clap = { version = "~4.4", features = ["derive"] }
tokio = { version = "1.20.1", features = ["full"] }
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
hyper-tls = "0.5.0"
aws-config = {version = "1.5.9", features = ["behavior-version-latest"]}
aws-sdk-s3 = { version = "1.59.0", features = ["http-1x"] }
clap = { version = "4.5.20", features = ["derive"] }
hyper = { version = "1.5.0", features = ["client", "full"] }
hyper-tls = "0.6.0"
hyper-util = { version = "0.1.10", features = ["client-legacy", "tokio"] }
reqwest = "0.12.9"
tokio = { version = "1.41.0", features = ["full"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
11 changes: 6 additions & 5 deletions rustv1/examples/sending-presigned-requests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use aws_config::meta::region::RegionProviderChain;
use aws_sdk_s3::presigning::{PresignedRequest, PresigningConfig};
use aws_sdk_s3::{config::Region, meta::PKG_VERSION, Client};
use clap::Parser;
use http::{HeaderName, HeaderValue};
use hyper::http::{HeaderName, HeaderValue};
use hyper_util::rt::TokioExecutor;
use std::error::Error;
use std::time::Duration;

Expand Down Expand Up @@ -94,7 +95,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
// Presigned requests can be used in several ways. Here are a few examples:
print_as_curl_request(&presigned_request, Some(body.as_str()));
send_presigned_request_with_reqwest(&presigned_request, body.clone()).await;
send_presigned_request_with_hyper(presigned_request, hyper::Body::from(body.clone())).await;
send_presigned_request_with_hyper(presigned_request, body.clone()).await;

Ok(())
}
Expand Down Expand Up @@ -125,10 +126,10 @@ fn print_as_curl_request(presigned_req: &PresignedRequest, body: Option<&str>) {
}

/// This function demonstrates how you can send a presigned request using [hyper](https://crates.io/crates/hyper)
async fn send_presigned_request_with_hyper(req: PresignedRequest, body: hyper::Body) {
async fn send_presigned_request_with_hyper(req: PresignedRequest, body: String) {
let conn = hyper_tls::HttpsConnector::new();
let client = hyper::Client::builder().build(conn);
let req = req.into_http_02x_request(body);
let client = hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(conn);
let req = req.into_http_1x_request(body);

let res = client.request(req).await;

Expand Down
Loading

0 comments on commit ba262cb

Please sign in to comment.