diff --git a/services/backup/src/config.rs b/services/backup/src/config.rs --- a/services/backup/src/config.rs +++ b/services/backup/src/config.rs @@ -1,3 +1,4 @@ +use aws_config::BehaviorVersion; use clap::Parser; use once_cell::sync::Lazy; use tracing::info; @@ -37,7 +38,7 @@ /// Provides region/credentials configuration for AWS SDKs pub async fn load_aws_config() -> aws_config::SdkConfig { - let mut config_builder = aws_config::from_env(); + let mut config_builder = aws_config::defaults(BehaviorVersion::v2024_03_28()); if let Some(endpoint) = &CONFIG.localstack_endpoint { info!("Using Localstack. AWS endpoint URL: {}", endpoint); diff --git a/services/blob/src/config.rs b/services/blob/src/config.rs --- a/services/blob/src/config.rs +++ b/services/blob/src/config.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use aws_config::BehaviorVersion; use clap::{ArgAction, Parser}; use once_cell::sync::Lazy; use std::collections::HashSet; @@ -58,7 +59,7 @@ /// Provides region/credentials configuration for AWS SDKs pub async fn load_aws_config() -> aws_config::SdkConfig { - let mut config_builder = aws_config::from_env(); + let mut config_builder = aws_config::defaults(BehaviorVersion::v2024_03_28()); if let Some(endpoint) = &CONFIG.localstack_endpoint { info!("Using Localstack. AWS endpoint URL: {}", endpoint); diff --git a/services/feature-flags/src/config.rs b/services/feature-flags/src/config.rs --- a/services/feature-flags/src/config.rs +++ b/services/feature-flags/src/config.rs @@ -1,3 +1,4 @@ +use aws_config::BehaviorVersion; use clap::Parser; use once_cell::sync::Lazy; use tracing::info; @@ -22,7 +23,7 @@ } pub async fn load_aws_config() -> aws_config::SdkConfig { - let mut config_builder = aws_config::from_env(); + let mut config_builder = aws_config::defaults(BehaviorVersion::v2024_03_28()); if let Some(endpoint) = &CONFIG.localstack_endpoint { info!("Using Localstack. AWS endpoint URL: {}", endpoint); diff --git a/services/identity/src/main.rs b/services/identity/src/main.rs --- a/services/identity/src/main.rs +++ b/services/identity/src/main.rs @@ -1,5 +1,6 @@ use comm_lib::aws; use comm_lib::aws::config::timeout::TimeoutConfig; +use comm_lib::aws::config::BehaviorVersion; use config::Command; use database::DatabaseClient; use tonic::transport::Server; @@ -73,7 +74,7 @@ Command::Server => { config::load_server_config(); let addr = IDENTITY_SERVICE_SOCKET_ADDR.parse()?; - let aws_config = aws::config::from_env() + let aws_config = aws::config::defaults(BehaviorVersion::v2024_03_28()) .timeout_config( TimeoutConfig::builder() .connect_timeout(Duration::from_secs(60)) @@ -121,7 +122,10 @@ }; } Command::SyncIdentitySearch => { - let aws_config = aws::config::from_env().region("us-east-2").load().await; + let aws_config = aws::config::defaults(BehaviorVersion::v2024_03_28()) + .region("us-east-2") + .load() + .await; let database_client = DatabaseClient::new(&aws_config); let sync_result = sync_index(&database_client).await; diff --git a/services/reports/src/config.rs b/services/reports/src/config.rs --- a/services/reports/src/config.rs +++ b/services/reports/src/config.rs @@ -1,4 +1,5 @@ use anyhow::Result; +use aws_config::BehaviorVersion; use clap::{ArgAction, Parser}; use comm_lib::blob::client::Url; use once_cell::sync::Lazy; @@ -93,7 +94,7 @@ /// Provides region/credentials configuration for AWS SDKs pub async fn load_aws_config() -> aws_config::SdkConfig { - let mut config_builder = aws_config::from_env(); + let mut config_builder = aws_config::defaults(BehaviorVersion::v2024_03_28()); if let Some(endpoint) = &CONFIG.localstack_endpoint { info!("Using Localstack. AWS Endpoint URL: {}", endpoint);