Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Store Credential Provider #494

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nativelink-store/src/s3_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use std::time::Duration;
use std::{cmp, env};

use async_trait::async_trait;
use aws_config::default_provider::credentials;
use aws_sdk_s3::config::Region;
use aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadOutput;
use aws_sdk_s3::operation::get_object::GetObjectError;
Expand Down Expand Up @@ -152,7 +153,9 @@ impl S3Store {
});
let s3_client = {
let http_client = HyperClientBuilder::new().build(TlsConnector::new(config, jitter_fn.clone()));
let credential_provider = credentials::default_provider().await;
let mut config_builder = aws_config::from_env()
.credentials_provider(credential_provider)
.region(Region::new(Cow::Owned(config.region.clone())))
.http_client(http_client);
// TODO(allada) When aws-sdk supports this env variable we should be able
Expand Down