Skip to content

Commit

Permalink
add latest behaviour version to the aws client
Browse files Browse the repository at this point in the history
  • Loading branch information
py committed Dec 3, 2024
1 parent 56f5c22 commit fb357c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/configuration/src/version1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down
1 change: 1 addition & 0 deletions crates/ndc-dynamodb/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fb357c7

Please sign in to comment.