|
| 1 | +# AWS Database Encryption SDK for DynamoDB |
| 2 | + |
| 3 | +AWS Database Encryption SDK for DynamoDB |
| 4 | + |
| 5 | +## Using the AWS Database Encryption SDK for DynamoDB for Rust |
| 6 | + |
| 7 | +The AWS Database Encryption SDK for DynamoDB is available on [Crates.io](https://www.crates.io/). |
| 8 | + |
| 9 | +## Building the AWS Database Encryption SDK for DynamoDB |
| 10 | + |
| 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. |
| 12 | + |
| 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. |
| 14 | + |
| 15 | +To setup your project to use the AWS Database Encryption SDK for DynamoDB in Rust, run: |
| 16 | + |
| 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 | +``` |
| 27 | + |
| 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. |
| 62 | + |
| 63 | +## License |
| 64 | + |
| 65 | +This library is licensed under the Apache 2.0 License. |
0 commit comments