From 644e8722641c826603f7ee3c2c7b58f31ab88c23 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 18 May 2023 13:04:17 +0200 Subject: Port k2v-client to aws-sigv4 since rusoto_signature is deprecated --- src/k2v-client/bin/k2v-cli.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/k2v-client/bin/k2v-cli.rs') diff --git a/src/k2v-client/bin/k2v-cli.rs b/src/k2v-client/bin/k2v-cli.rs index 984b4192..5a2422ab 100644 --- a/src/k2v-client/bin/k2v-cli.rs +++ b/src/k2v-client/bin/k2v-cli.rs @@ -8,9 +8,6 @@ use k2v_client::*; use format_table::format_table; -use rusoto_core::credential::AwsCredentials; -use rusoto_core::Region; - use clap::{Parser, Subcommand}; /// K2V command line interface @@ -408,14 +405,16 @@ async fn main() -> Result<(), Error> { let args = Args::parse(); - let region = Region::Custom { - name: args.region, + let config = K2vClientConfig { endpoint: args.endpoint, + region: args.region, + aws_access_key_id: args.key_id, + aws_secret_access_key: args.secret, + bucket: args.bucket, + user_agent: None, }; - let creds = AwsCredentials::new(args.key_id, args.secret, None, None); - - let client = K2vClient::new(region, args.bucket, creds, None)?; + let client = K2vClient::new(config)?; match args.command { Command::Insert { -- cgit v1.2.3