View a markdown version of this page

Using the AWS Database Encryption SDK with AWS KMS - AWS Database Encryption SDK

Using the AWS Database Encryption SDK with AWS KMS

Our client-side encryption library was renamed to the AWS Database Encryption SDK. This developer guide still provides information on the DynamoDB Encryption Client.

To use the AWS Database Encryption SDK, you need to configure a keyring and specify one or more wrapping keys. If you don't have a key infrastructure, we recommend using AWS Key Management Service (AWS KMS).

The AWS Database Encryption SDK supports two types of AWS KMS keyrings. The traditional AWS KMS keyring uses AWS KMS keys to generate, encrypt, and decrypt data keys. You can use either symmetric encryption (SYMMETRIC_DEFAULT) or asymmetric RSA KMS keys. Since the AWS Database Encryption SDK encrypts and signs every record with a unique data key, the AWS KMS keyring must call AWS KMS for every encrypt and decrypt operation. For applications that need to minimize the number of calls to AWS KMS, the AWS Database Encryption SDK also supports the AWS KMS Hierarchical keyring. The Hierarchical keyring is a cryptographic materials caching solution that reduces the number of AWS KMS calls by using AWS KMS protected branch keys persisted in an Amazon DynamoDB table, and then locally caching branch key materials used in encrypt and decrypt operations. We recommend using the AWS KMS keyrings whenever possible.

To interact with AWS KMS, the AWS Database Encryption SDK requires the AWS KMS module of the AWS SDK for Java.

To prepare to use the AWS Database Encryption SDK with AWS KMS
  • Create a symmetric encryption AWS KMS key. For help, see Creating Keys in the AWS Key Management Service Developer Guide.

    Tip

    To use the AWS KMS key programmatically, you will need the Amazon Resource Name (ARN) of the AWS KMS key. For help finding the ARN of an AWS KMS key, see Finding the Key ID and ARN in the AWS Key Management Service Developer Guide.