blob: e9d4849a4b8d928f5a57f3560ad0b84dfa51697c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use aws_sdk_s3::{Client, Config, Credentials, Endpoint};
use super::garage::{Instance, Key};
pub fn build_client(instance: &Instance, key: &Key) -> Client {
let credentials = Credentials::new(&key.id, &key.secret, None, None, "garage-integ-test");
let endpoint = Endpoint::immutable(instance.s3_uri());
let config = Config::builder()
.region(super::REGION)
.credentials_provider(credentials)
.endpoint_resolver(endpoint)
.build();
Client::from_conf(config)
}
|