File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
rust_dev_preview/examples/tls Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ path = "src/lib.rs"
1313
1414[dependencies ]
1515aws-config = { git = " https://github.com/awslabs/aws-sdk-rust" , branch = " next" }
16- aws-smithy-client = { git = " https://github.com/awslabs/aws-sdk-rust" , branch = " next" }
16+ aws-smithy-runtime = { git = " https://github.com/awslabs/aws-sdk-rust" , branch = " next" }
1717aws-sdk-kms = { git = " https://github.com/awslabs/aws-sdk-rust" , branch = " next" , default-features = false }
1818webpki-roots = " 0.22.4"
1919tokio = { version = " 1.20.1" , features = [" full" ] }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ This example assumes you have set up environment variables for authentication.
1515*/
1616
1717use aws_sdk_kms:: Error ;
18- use aws_smithy_client :: hyper_ext ;
18+ use aws_smithy_runtime :: client :: http :: hyper_014 :: HyperClientBuilder ;
1919use rustls:: RootCertStore ;
2020
2121// snippet-start:[rust.example_code.tls.ConnectWithTLS13]
@@ -49,10 +49,10 @@ pub async fn connect_via_tls_13() -> Result<(), Error> {
4949 . enable_http2 ( )
5050 . build ( ) ;
5151
52- let shared_conf = aws_config :: from_env ( )
53- . http_connector ( hyper_ext :: Adapter :: builder ( ) . build ( rustls_connector) )
54- . load ( )
55- . await ;
52+ // See https://github.com/awslabs/smithy-rs/discussions/3022 for the HyperClientBuilder
53+ let http_client = HyperClientBuilder :: new ( ) . build ( rustls_connector) ;
54+
55+ let shared_conf = aws_config :: from_env ( ) . http_client ( http_client ) . load ( ) . await ;
5656
5757 let kms_client = aws_sdk_kms:: Client :: new ( & shared_conf) ;
5858 let response = kms_client. list_keys ( ) . send ( ) . await ?;
You can’t perform that action at this time.
0 commit comments