dynamo-db
  1. dynamo-db-key-management

Key Management - DynamoDB Data Encryption

Heading

DynamoDB is a managed NoSQL database service provided by AWS. It provides encryption at rest functionality to protect sensitive data. When you enable encryption at rest on a DynamoDB table, AWS encrypts all data written to the table, including table indexes, and stores the encrypted data in the table.

Syntax

To enable encryption at rest on a DynamoDB table, you need to create an AWS Key Management Service (KMS) key and associate it with the table. Encryption at rest is not enabled by default on DynamoDB tables.

Example

Here's an example of how to enable encryption at rest on a DynamoDB table using the AWS CLI:

aws ddb create-table --table-name myTable \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST \
--sse-specification Enabled=true,SSEType=KMS,KMSMasterKeyId=<KMS key ID>

Output

When you enable encryption at rest on a DynamoDB table, all data written to the table, including table indexes, is automatically encrypted and stored in the table.

Explanation

AWS provides encryption at rest for DynamoDB using the AWS KMS service. When you enable encryption at rest on a DynamoDB table, AWS encrypts all data written to the table, including table indexes, and stores the encrypted data in the table. You can manage the KMS keys used for encryption through the AWS KMS service, including creating and deleting keys, and controlling key access.

Use

Enabling encryption at rest on a DynamoDB table adds an extra layer of security to protect sensitive data. By using encryption, you can ensure that even if the underlying storage is compromised, the data is still protected.

Important Points

  • Encryption at rest is not enabled by default on DynamoDB tables.
  • To enable encryption at rest, you need to create an AWS KMS key and associate it with the DynamoDB table.
  • AWS encrypts all data written to the table, including table indexes, and stores the encrypted data in the table.

Summary

Encryption at rest is an important security feature for protecting sensitive data. When you enable encryption at rest on a DynamoDB table, AWS encrypts all data written to the table, including table indexes, and stores the encrypted data in the table. By using the AWS KMS service, you can manage the encryption keys used to protect your data.

Published on: