Created
December 15, 2023 21:11
-
-
Save adam-singer/8123e54aa990816ef400200d3de32591 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[tokio::test] | |
async fn test_it() { | |
let connector = hyper_rustls::HttpsConnectorBuilder::new() | |
.with_webpki_roots() | |
.https_only() | |
.enable_http1() | |
.enable_http2() | |
.build(); | |
let http_client = HyperClientBuilder::new().build(connector); | |
let cred_provider = aws_config::default_provider::credentials::default_provider().await; | |
println!("{:#?}", cred_provider); | |
let mut config_builder = aws_config::from_env() | |
.credentials_provider(cred_provider) | |
.region(Region::new("us-east-1")) | |
.http_client(http_client); | |
println!("{:#?}", config_builder); | |
let client = aws_sdk_s3::Client::new(&config_builder.load().await); | |
let result = client.list_objects().bucket("nativelink-test-bucket").send().await; | |
println!("{:#?}", result); | |
assert_eq!(1, 1, "test"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment