blob: ef4daa5d64760a5a564b38e8648b8cf49f09cd48 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
use aws_sdk_s3::config::Credentials;
use aws_sdk_s3::{Client, Config};
use super::garage::Key;
use crate::common::garage::DEFAULT_PORT;
pub fn build_client(key: &Key) -> Client {
let credentials = Credentials::new(&key.id, &key.secret, None, None, "garage-integ-test");
let config = Config::builder()
.endpoint_url(format!("http://127.0.0.1:{}", DEFAULT_PORT))
.region(super::REGION)
.credentials_provider(credentials)
.build();
Client::from_conf(config)
}
|