From fb357c7790401f4bc68793842f6f8f52416f35aa Mon Sep 17 00:00:00 2001 From: py Date: Tue, 3 Dec 2024 18:33:00 +0530 Subject: [PATCH] add latest behaviour version to the aws client --- crates/configuration/src/version1.rs | 3 ++- crates/ndc-dynamodb/src/state.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/configuration/src/version1.rs b/crates/configuration/src/version1.rs index 24feb00..584a4dc 100644 --- a/crates/configuration/src/version1.rs +++ b/crates/configuration/src/version1.rs @@ -106,6 +106,7 @@ pub async fn introspect( let config = Config::builder() .region(aws_config::Region::new(region.to_string())) .credentials_provider(credentials) + .behavior_version_latest() .build(); // To use localhost url @@ -122,7 +123,7 @@ pub async fn introspect( let tables_result = client.list_tables().send().await; let tables = tables_result .map_err(|_op| { - ParseConfigurationError::IoErrorButStringified("Failed to list tables:".to_string()) + ParseConfigurationError::IoErrorButStringified("Failed to list tables".to_string()) }) .unwrap(); //TODO: handle error let table_names = tables.table_names.unwrap_or_default(); diff --git a/crates/ndc-dynamodb/src/state.rs b/crates/ndc-dynamodb/src/state.rs index 9992f43..3ca5b21 100644 --- a/crates/ndc-dynamodb/src/state.rs +++ b/crates/ndc-dynamodb/src/state.rs @@ -43,6 +43,7 @@ pub async fn create_state( let config = Config::builder() .region(aws_config::Region::new(region)) .credentials_provider(credentials) + .behavior_version_latest() .build(); let client = aws_sdk_dynamodb::Client::from_conf(config);