Skip to content

Commit

Permalink
tough-ssm: upgrade to hyper-v1 using aws-smithy-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
gthao313 committed Sep 27, 2024
1 parent 670edd7 commit 2d92113
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tough-ssm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ aws-sdk-rust-rustls = ["aws-config/rustls", "aws-sdk-ssm/rustls"]
[dependencies]
tough = { version = "0.18", path = "../tough", features = ["http"] }
aws-sdk-ssm = "1"
aws-config = "1"
aws-config = { version = "1", default-features = false, features = ["credentials-process"] }
aws-smithy-experimental = { version = "0.1", features = ["crypto-aws-lc"] }
snafu = { version = "0.8", features = ["backtraces-impl-backtrace-crate"] }
tokio = { version = "1", features = ["fs", "io-util", "time", "macros", "rt-multi-thread"] }
6 changes: 5 additions & 1 deletion tough-ssm/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use aws_config::default_provider::credentials::DefaultCredentialsChain;
use aws_config::default_provider::region::DefaultRegionChain;
use aws_config::BehaviorVersion;
use aws_sdk_ssm::Client as SsmClient;
use aws_smithy_experimental::hyper_1_0::{CryptoMode, HyperClientBuilder};
use snafu::ResultExt;
use std::thread;

Expand All @@ -26,7 +27,10 @@ pub(crate) fn build_client(profile: Option<&str>) -> Result<SsmClient> {
}

async fn async_build_client(profile: Option<String>) -> SsmClient {
let config = aws_config::defaults(BehaviorVersion::v2024_03_28());
let http_client = HyperClientBuilder::new()
.crypto_mode(CryptoMode::AwsLc) // Choose a crypto provider.
.build_https();
let config = aws_config::defaults(BehaviorVersion::v2024_03_28()).http_client(http_client);
let client_config = if let Some(profile) = profile {
let region = DefaultRegionChain::builder()
.profile_name(&profile)
Expand Down

0 comments on commit 2d92113

Please sign in to comment.