Skip to content

Commit 8be3175

Browse files
author
Adam Singer
committed
S3 Store credential provider
1 parent 3dacdad commit 8be3175

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nativelink-store/src/s3_store.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ use std::time::Duration;
2222
use std::{cmp, env};
2323

2424
use async_trait::async_trait;
25+
use aws_config::default_provider::credentials;
2526
use aws_sdk_s3::config::Region;
2627
use aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadOutput;
2728
use aws_sdk_s3::operation::get_object::GetObjectError;
@@ -150,7 +151,9 @@ impl S3Store {
150151
});
151152
let s3_client = {
152153
let http_client = HyperClientBuilder::new().build(TlsConnector::new(config, jitter_fn.clone()));
154+
let credential_provider = credentials::default_provider().await;
153155
let mut config_builder = aws_config::from_env()
156+
.credentials_provider(credential_provider)
154157
.region(Region::new(Cow::Owned(config.region.clone())))
155158
.http_client(http_client);
156159
// TODO(allada) When aws-sdk supports this env variable we should be able

0 commit comments

Comments
 (0)