Skip to content

Commit

Permalink
Add ChainProvider for AWS S3 (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
fvaleye authored Mar 17, 2021
1 parent f1f3e07 commit e3d7038
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rust/src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{fmt, pin::Pin};
use chrono::{DateTime, FixedOffset, Utc};
use futures::Stream;
use log::debug;
use rusoto_core::credential::ChainProvider;
use rusoto_core::{Region, RusotoError};
use rusoto_s3::{
GetObjectRequest, HeadObjectRequest, ListObjectsV2Request, PutObjectRequest, S3Client, S3,
Expand Down Expand Up @@ -119,7 +120,11 @@ pub struct S3StorageBackend {

impl S3StorageBackend {
pub fn new() -> Self {
let client = S3Client::new(Region::default());
let client = S3Client::new_with(
rusoto_core::HttpClient::new().expect("failed to create request dispatcher"),
ChainProvider::new(),
Region::default(),
);
Self { client }
}
}
Expand Down

0 comments on commit e3d7038

Please sign in to comment.