Skip to content

Commit e10fed9

Browse files
authored
chore:Rust release 0.2.0 (#1526)
* chore:Rust release 0.2.0
1 parent a4ca2f9 commit e10fed9

File tree

168 files changed

+21630
-4855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+21630
-4855
lines changed

DynamoDbEncryption/runtimes/rust/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "aws-db-esdk"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
edition = "2021"
55
rust-version = "1.81.0"
66
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]

DynamoDbEncryption/runtimes/rust/start_release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ perl -pe "s/^version = .*$/version = \"$1\"/" < Cargo.toml > new_Cargo.toml
2222
mv new_Cargo.toml Cargo.toml
2323

2424
# Remove all files and directories in src except for specified files
25-
find src -depth 1 | egrep -v '(intercept.rs|lib.rs|software_externs.rs)' | xargs rm -rf
25+
find src -depth 1 | egrep -v '(intercept.rs|lib.rs|software_externs.rs|README)' | xargs rm -rf
2626

2727
# Change to the parent directory and run make polymorph and transpile commands
2828
cd ../..

releases/rust/db_esdk/Cargo.toml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "aws-db-esdk"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
edition = "2021"
5-
rust-version = "1.80.0"
5+
rust-version = "1.81.0"
66
keywords = ["cryptography", "security", "dynamodb", "encryption", "client-side"]
77
license = "ISC AND (Apache-2.0 OR ISC)"
88
description = "aws-db-esdk is a library for implementing client side encryption with DynamoDB."
@@ -16,18 +16,19 @@ readme = "README.md"
1616
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1717

1818
[dependencies]
19-
aws-config = "1.5.10"
20-
aws-lc-rs = "1.11.1"
21-
aws-lc-sys = "0.23.1"
22-
aws-sdk-dynamodb = "1.54.0"
23-
aws-sdk-kms = "1.50.0"
19+
aws-config = "1.5.11"
20+
aws-lc-rs = "1.12.0"
21+
aws-lc-sys = "0.24.0"
22+
aws-sdk-dynamodb = "1.56.0"
23+
aws-sdk-kms = "1.52.0"
2424
aws-smithy-runtime-api = {version = "1.7.3", features = ["client"] }
25-
aws-smithy-types = "1.2.9"
26-
chrono = "0.4.38"
25+
aws-smithy-types = "1.2.10"
26+
chrono = "0.4.39"
27+
cpu-time = "1.0.0"
2728
dafny-runtime = "0.1.1"
2829
dashmap = "6.1.0"
2930
pem = "3.0.4"
30-
tokio = {version = "1.41.1", features = ["full"] }
31+
tokio = {version = "1.42.0", features = ["full"] }
3132
uuid = { version = "1.11.0", features = ["v4"] }
3233

3334
[[example]]

releases/rust/db_esdk/README.md

+17-51
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,30 @@
11
# AWS Database Encryption SDK for DynamoDB
22

3-
AWS Database Encryption SDK for DynamoDB
3+
[![build status](https://github.com/aws/aws-database-encryption-sdk-dynamodb/actions/workflows/daily_ci.yml/badge.svg?branch=main)](https://github.com/aws/aws-database-encryption-sdk-dynamodb/actions/workflows/daily_ci.yml)
4+
[![crates.io](https://img.shields.io/crates/v/aws-db-esdk.svg)](https://crates.io/crates/aws-db-esdk)
5+
[![docs](https://docs.rs/aws-db-esdk/badge.svg)](https://docs.rs/aws-db-esdk)
6+
[![rustc](https://img.shields.io/badge/rust-1.81%2B-orange.svg)](https://img.shields.io/badge/rust-1.81%2B-orange.svg)
47

5-
## Using the AWS Database Encryption SDK for DynamoDB for Rust
8+
This is the official [AWS Database Encryption SDK (DB-ESDK) for DynamoDB in Rust](https://crates.io/crates/aws-db-esdk).
69

7-
The AWS Database Encryption SDK for DynamoDB is available on [Crates.io](https://www.crates.io/).
10+
## [CHANGELOG](https://github.com/aws/aws-database-encryption-sdk-dynamodb/blob/main/CHANGELOG.md)
811

9-
## Building the AWS Database Encryption SDK for DynamoDB
12+
## Overview
1013

11-
To build, the AWS Database Encryption SDK for DynamoDB requires the most up to date version of [Dafny](https://github.com/dafny-lang/dafny) on your PATH.
14+
The AWS Database Encryption SDK (DB-ESDK) for DynamoDB is a client-side encryption
15+
library that allows you to perform attribute-level encryption, enabling you to encrypt specific
16+
attribute values within items before storing them in your DynamoDB table. All encryption and
17+
decryption are performed within your application. This lets you protect sensitive data in-transit
18+
and at-rest, as data cannot be exposed unless decrypted by your application.
1219

13-
You will also need to ensure that you fetch all submodules using either `git clone --recursive ...` when cloning the repository or `git submodule update --init` on an existing clone.
20+
For more details about the design and architecture of the DB-ESDK for DynamoDB,
21+
see the [AWS Database Encryption SDK Developer Guide](https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/).
1422

15-
To setup your project to use the AWS Database Encryption SDK for DynamoDB in Rust, run:
23+
## Examples for AWS Database Encryption SDK in Rust
1624

17-
```
18-
cd DynamoDbEncryption
19-
# Polymorph smithy to Rust
20-
make polymorph_rust
21-
# Transpile Dafny to Rust
22-
make transpile_rust
23-
# Build Project
24-
cd runtimes/rust
25-
cargo build
26-
```
25+
Please look at the Examples on how to use the AWS Database Encryption SDK in Rust [here](https://github.com/aws/aws-database-encryption-sdk-dynamodb/tree/main/DynamoDbEncryption/runtimes/rust/examples).
2726

28-
### (Optional) Set up the AWS Database Encryption SDK for DynamoDB to work with AWS KMS
29-
30-
If you set up the AWS Database Encryption SDK for DynamoDB to use the AWS KMS Keyring,
31-
the AWS Database Encryption SDK for DynamoDB will make calls to AWS KMS on your behalf,
32-
using the appropriate AWS SDK.
33-
34-
However, you must first set up AWS credentials for use with the AWS SDK.
35-
36-
## Testing the AWS Database Encryption SDK for DynamoDB for Rust
37-
38-
### Configure AWS credentials
39-
40-
To run the test suite you must first set up AWS credentials for use with the AWS SDK.
41-
This is required in order to run the integration tests, which use a KMS Keyring against a publicly accessible KMS CMK.
42-
43-
### Run the tests
44-
45-
Run the test suite with:
46-
47-
```
48-
cd AwsEncryptionSDK
49-
make test_rust
50-
```
51-
52-
Run tests on examples, to ensure they are up to date:
53-
54-
```
55-
cd AwsEncryptionSDK/runtimes/rust/
56-
cargo test --examples
57-
```
58-
59-
Please look at the Examples on how to use the Encryption SDK in Rust [here](examples).
60-
61-
Please note that tests and test vectors require internet access and valid AWS credentials, since calls to KMS are made as part of the test workflow.
27+
Please note that some examples MAY require internet access and valid AWS credentials, since calls to KMS are made.
6228

6329
## License
6430

releases/rust/db_esdk/examples/basic_get_put_example.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use crate::test_utils;
55
use aws_sdk_dynamodb::types::AttributeValue;
66
use std::collections::HashMap;
77

8-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction;
9-
use aws_db_esdk::aws_cryptography_materialProviders::client;
10-
use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
8+
use aws_db_esdk::CryptoAction;
9+
use aws_db_esdk::material_providers::client;
10+
use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
1111

12-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig;
13-
use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId;
12+
use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig;
13+
use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId;
1414
use aws_db_esdk::intercept::DbEsdkInterceptor;
1515
use aws_db_esdk::types::dynamo_db_tables_encryption_config::DynamoDbTablesEncryptionConfig;
1616

@@ -116,7 +116,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> {
116116
// 5. Create a new AWS SDK DynamoDb client using the TableEncryptionConfigs
117117
let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
118118
let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
119-
.interceptor(DbEsdkInterceptor::new(table_configs))
119+
.interceptor(DbEsdkInterceptor::new(table_configs)?)
120120
.build();
121121
let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config);
122122

releases/rust/db_esdk/examples/clientsupplier/client_supplier_example.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
use super::regional_role_client_supplier::RegionalRoleClientSupplier;
55
use crate::test_utils;
6-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig;
7-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction;
8-
use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client;
9-
use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
10-
use aws_db_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter;
6+
use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig;
7+
use aws_db_esdk::CryptoAction;
8+
use aws_db_esdk::material_providers::client as mpl_client;
9+
use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
10+
use aws_db_esdk::material_providers::types::DiscoveryFilter;
1111
use aws_db_esdk::intercept::DbEsdkInterceptor;
1212
use aws_db_esdk::DynamoDbTablesEncryptionConfig;
1313
use aws_sdk_dynamodb::types::AttributeValue;
@@ -123,7 +123,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> {
123123
// 5. Create a new AWS SDK DynamoDb client using the DynamoDb Config above
124124
let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
125125
let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
126-
.interceptor(DbEsdkInterceptor::new(table_configs))
126+
.interceptor(DbEsdkInterceptor::new(table_configs)?)
127127
.build();
128128
let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config);
129129

@@ -215,7 +215,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> {
215215
.build()?;
216216

217217
let only_replica_dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
218-
.interceptor(DbEsdkInterceptor::new(only_replica_table_configs))
218+
.interceptor(DbEsdkInterceptor::new(only_replica_table_configs)?)
219219
.build();
220220
let only_replica_ddb = aws_sdk_dynamodb::Client::from_conf(only_replica_dynamo_config);
221221

releases/rust/db_esdk/examples/clientsupplier/regional_role_client_supplier.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use aws_config::Region;
5-
use aws_db_esdk::aws_cryptography_materialProviders::operation::get_client::GetClientInput;
6-
use aws_db_esdk::aws_cryptography_materialProviders::types::error::Error;
7-
use aws_db_esdk::aws_cryptography_materialProviders::types::ClientSupplier;
8-
use aws_db_esdk::deps::com_amazonaws_kms::client::Client as kms_client;
5+
use aws_db_esdk::material_providers::operation::get_client::GetClientInput;
6+
use aws_db_esdk::material_providers::types::error::Error;
7+
use aws_db_esdk::material_providers::types::ClientSupplier;
8+
use aws_db_esdk::com_amazonaws_kms::client::Client as kms_client;
99

1010
/*
1111
Example class demonstrating an implementation of a custom client supplier.
@@ -44,7 +44,7 @@ impl ClientSupplier for RegionalRoleClientSupplier {
4444
.build();
4545

4646
let inner_client = aws_sdk_kms::Client::from_conf(kms_config);
47-
Ok(aws_db_esdk::deps::com_amazonaws_kms::client::Client {
47+
Ok(kms_client {
4848
inner: inner_client,
4949
})
5050
}

releases/rust/db_esdk/examples/create_keystore_key.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use crate::test_utils;
5-
use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client;
6-
use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig;
7-
use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration;
5+
use aws_db_esdk::key_store::client as keystore_client;
6+
use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig;
7+
use aws_db_esdk::key_store::types::KmsConfiguration;
88

99
/*
1010
The Hierarchical Keyring Example and Searchable Encryption Examples

releases/rust/db_esdk/examples/get_encrypted_data_key_description.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use crate::test_utils;
5-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::client as dbesdk_client;
6-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig;
7-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::GetEncryptedDataKeyDescriptionUnion;
5+
use aws_db_esdk::dynamodb::client as dbesdk_client;
6+
use aws_db_esdk::dynamodb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig;
7+
use aws_db_esdk::dynamodb::types::GetEncryptedDataKeyDescriptionUnion;
88
use aws_sdk_dynamodb::types::AttributeValue;
99
use std::collections::HashMap;
1010

releases/rust/db_esdk/examples/itemencryptor/item_encrypt_decrypt.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ use crate::test_utils;
55
use aws_sdk_dynamodb::types::AttributeValue;
66
use std::collections::HashMap;
77

8-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction;
9-
use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client;
10-
use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
8+
use aws_db_esdk::CryptoAction;
9+
use aws_db_esdk::material_providers::client as mpl_client;
10+
use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
1111

12-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig;
13-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb_itemEncryptor::client as enc_client;
14-
use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId;
12+
use aws_db_esdk::item_encryptor::types::dynamo_db_item_encryptor_config::DynamoDbItemEncryptorConfig;
13+
use aws_db_esdk::item_encryptor::client as enc_client;
14+
use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId;
1515

1616
/*
1717
This example sets up a DynamoDb Item Encryptor and uses

releases/rust/db_esdk/examples/keyring/branch_key_id_supplier.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput;
5-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput;
6-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::error::Error;
7-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbKeyBranchKeyIdSupplier;
4+
use aws_db_esdk::dynamodb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyInput;
5+
use aws_db_esdk::dynamodb::operation::get_branch_key_id_from_ddb_key::GetBranchKeyIdFromDdbKeyOutput;
6+
use aws_db_esdk::dynamodb::types::error::Error;
7+
use aws_db_esdk::dynamodb::types::DynamoDbKeyBranchKeyIdSupplier;
88

99
// Used in the 'HierarchicalKeyringExample'.
1010
// In that example, we have a table where we distinguish multiple tenants

releases/rust/db_esdk/examples/keyring/hierarchical_keyring.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
use super::branch_key_id_supplier::ExampleBranchKeyIdSupplier;
55
use crate::test_utils;
6-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::client as dbesdk_client;
7-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig;
8-
use aws_db_esdk::aws_cryptography_keyStore::client as keystore_client;
9-
use aws_db_esdk::aws_cryptography_keyStore::types::key_store_config::KeyStoreConfig;
10-
use aws_db_esdk::aws_cryptography_keyStore::types::KmsConfiguration;
11-
use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client;
12-
use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
13-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig;
14-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction;
6+
use aws_db_esdk::dynamodb::client as dbesdk_client;
7+
use aws_db_esdk::dynamodb::types::dynamo_db_encryption_config::DynamoDbEncryptionConfig;
8+
use aws_db_esdk::key_store::client as keystore_client;
9+
use aws_db_esdk::key_store::types::key_store_config::KeyStoreConfig;
10+
use aws_db_esdk::key_store::types::KmsConfiguration;
11+
use aws_db_esdk::material_providers::client as mpl_client;
12+
use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
13+
use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig;
14+
use aws_db_esdk::CryptoAction;
1515
use aws_db_esdk::intercept::DbEsdkInterceptor;
1616
use aws_db_esdk::DynamoDbTablesEncryptionConfig;
1717
use aws_sdk_dynamodb::types::AttributeValue;
@@ -181,7 +181,7 @@ pub async fn put_item_get_item(
181181
// 7. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above
182182
let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
183183
let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
184-
.interceptor(DbEsdkInterceptor::new(table_configs))
184+
.interceptor(DbEsdkInterceptor::new(table_configs)?)
185185
.build();
186186
let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config);
187187

releases/rust/db_esdk/examples/keyring/kms_rsa_keyring.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use crate::test_utils;
5-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig;
6-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction;
7-
use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client;
8-
use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
9-
use aws_db_esdk::aws_cryptography_materialProviders::types::DbeAlgorithmSuiteId;
5+
use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig;
6+
use aws_db_esdk::CryptoAction;
7+
use aws_db_esdk::material_providers::client as mpl_client;
8+
use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
9+
use aws_db_esdk::material_providers::types::DbeAlgorithmSuiteId;
1010
use aws_db_esdk::intercept::DbEsdkInterceptor;
1111
use aws_db_esdk::DynamoDbTablesEncryptionConfig;
1212
use aws_sdk_dynamodb::types::AttributeValue;
@@ -15,7 +15,7 @@ use std::fs::File;
1515
use std::io::Read;
1616
use std::io::Write;
1717
use std::path::Path;
18-
18+
1919
/*
2020
This example sets up DynamoDb Encryption for the AWS SDK client
2121
using the KMS RSA Keyring. This keyring uses a KMS RSA key pair to
@@ -151,7 +151,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> {
151151

152152
// 6. Create a new AWS SDK DynamoDb client using the DynamoDb Encryption Interceptor above
153153
let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
154-
.interceptor(DbEsdkInterceptor::new(table_configs))
154+
.interceptor(DbEsdkInterceptor::new(table_configs)?)
155155
.build();
156156
let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config);
157157

releases/rust/db_esdk/examples/keyring/mrk_discovery_multi_keyring.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
use crate::test_utils;
5-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_dynamoDb::types::DynamoDbTableEncryptionConfig;
6-
use aws_db_esdk::aws_cryptography_dbEncryptionSdk_structuredEncryption::types::CryptoAction;
7-
use aws_db_esdk::aws_cryptography_materialProviders::client as mpl_client;
8-
use aws_db_esdk::aws_cryptography_materialProviders::types::material_providers_config::MaterialProvidersConfig;
9-
use aws_db_esdk::aws_cryptography_materialProviders::types::DiscoveryFilter;
5+
use aws_db_esdk::dynamodb::types::DynamoDbTableEncryptionConfig;
6+
use aws_db_esdk::CryptoAction;
7+
use aws_db_esdk::material_providers::client as mpl_client;
8+
use aws_db_esdk::material_providers::types::material_providers_config::MaterialProvidersConfig;
9+
use aws_db_esdk::material_providers::types::DiscoveryFilter;
1010
use aws_db_esdk::intercept::DbEsdkInterceptor;
1111
use aws_db_esdk::DynamoDbTablesEncryptionConfig;
1212
use aws_sdk_dynamodb::types::AttributeValue;
@@ -115,7 +115,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> {
115115
// 5. Create a new AWS SDK DynamoDb client using the config above
116116
let sdk_config = aws_config::load_defaults(aws_config::BehaviorVersion::latest()).await;
117117
let dynamo_config = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
118-
.interceptor(DbEsdkInterceptor::new(table_configs))
118+
.interceptor(DbEsdkInterceptor::new(table_configs)?)
119119
.build();
120120
let ddb = aws_sdk_dynamodb::Client::from_conf(dynamo_config);
121121

@@ -182,7 +182,7 @@ pub async fn put_item_get_item() -> Result<(), crate::BoxError> {
182182
.build()?;
183183

184184
let dynamo_config_for_decrypt = aws_sdk_dynamodb::config::Builder::from(&sdk_config)
185-
.interceptor(DbEsdkInterceptor::new(table_configs_for_decrypt))
185+
.interceptor(DbEsdkInterceptor::new(table_configs_for_decrypt)?)
186186
.build();
187187
let ddb_for_decrypt = aws_sdk_dynamodb::Client::from_conf(dynamo_config_for_decrypt);
188188

0 commit comments

Comments
 (0)