diff --git a/Cargo.toml b/Cargo.toml index b739f6e94c..7b620b8042 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,9 +72,9 @@ arrow-schema = "51.0" arrow-select = "51.0" async-recursion = "1.0" async-trait = "0.1" -aws-config = "0.56" -aws-credential-types = "0.56" -aws-sdk-dynamodb = "0.34" +aws-config = "0.57" +aws-credential-types = "0.57" +aws-sdk-dynamodb = "0.35" half = { "version" = "2.4.1", default-features = false, features = [ "num-traits", "std", diff --git a/rust/lance-table/src/io/commit.rs b/rust/lance-table/src/io/commit.rs index 924eb33ef5..c99ba364aa 100644 --- a/rust/lance-table/src/io/commit.rs +++ b/rust/lance-table/src/io/commit.rs @@ -46,7 +46,6 @@ use lance_io::object_store::{ObjectStore, ObjectStoreExt, ObjectStoreParams}; #[cfg(feature = "dynamodb")] use { self::external_manifest::{ExternalManifestCommitHandler, ExternalManifestStore}, - aws_credential_types::cache::CredentialsCache, aws_credential_types::provider::error::CredentialsError, aws_credential_types::provider::ProvideCredentials, lance_io::object_store::{build_aws_credential, StorageOptions}, @@ -362,13 +361,16 @@ async fn build_dynamodb_external_store( app_name: &str, ) -> Result> { use super::commit::dynamodb::DynamoDBExternalManifestStore; - use aws_sdk_dynamodb::{config::Region, Client}; + use aws_sdk_dynamodb::{ + config::{IdentityCache, Region}, + Client, + }; let mut dynamodb_config = aws_sdk_dynamodb::config::Builder::new() .region(Some(Region::new(region.to_string()))) .credentials_provider(OSObjectStoreToAwsCredAdaptor(creds)) // caching should be handled by passed AwsCredentialProvider - .credentials_cache(CredentialsCache::no_caching()); + .identity_cache(IdentityCache::no_cache()); if let Some(endpoint) = endpoint { dynamodb_config = dynamodb_config.endpoint_url(endpoint); diff --git a/rust/lance-table/src/io/commit/dynamodb.rs b/rust/lance-table/src/io/commit/dynamodb.rs index d16848497c..d453fe74e7 100644 --- a/rust/lance-table/src/io/commit/dynamodb.rs +++ b/rust/lance-table/src/io/commit/dynamodb.rs @@ -173,19 +173,7 @@ impl DynamoDBExternalManifestStore { location!(), ) })?; - let key_type = key.key_type.ok_or_else(|| { - Error::io( - format!("dynamodb table: {table_name} key types must be defined"), - location!(), - ) - })?; - let name = key.attribute_name.ok_or_else(|| { - Error::io( - format!("dynamodb table: {table_name} key must have an attribute name"), - location!(), - ) - })?; - match (key_type, name.as_str()) { + match (key.key_type, key.attribute_name.as_str()) { (KeyType::Hash, base_uri!()) => { has_hask_key = true; } @@ -195,7 +183,8 @@ impl DynamoDBExternalManifestStore { _ => { return Err(Error::io( format!( - "dynamodb table: {table_name} unknown key type encountered name:{name}", + "dynamodb table: {} unknown key type encountered name:{}", + table_name, key.attribute_name ), location!(), ));