Registry /
aws / aws-cryptography-internal-dynamodb
Install & Compatibility
Where this runs
tested against v1.11.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ build_error
py 3.9
✕ build_error
✕ build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
EncryptedTable
✓ from aws_dynamodb_encryption_sdk.encrypted.table import EncryptedTable
This symbol is from the parent library, `aws-sdk-dynamodb-encryption`, which depends on this internal package. Do not attempt to import from `aws-cryptography-internal-dynamodb` directly, as it does not expose public interfaces.
DynamoDbEncryptionConfig
✓ from aws_dynamodb_encryption_sdk.identifiers import DynamoDbEncryptionConfig
Similar to `EncryptedTable`, this is part of the public API provided by the `aws-sdk-dynamodb-encryption` library, not this internal dependency.
This quickstart demonstrates the typical usage pattern for the AWS DynamoDB Encryption Client. Note that the imports and `EncryptedTable` class are provided by the *parent* library, `aws-sdk-dynamodb-encryption`, not `aws-cryptography-internal-dynamodb` directly. Ensure you have the `aws-sdk-dynamodb-encryption` package installed and configured with appropriate AWS credentials and a KMS key ARN. The example shows putting and getting an item, with client-side encryption and decryption handled automatically.
import os
import boto3
from aws_dynamodb_encryption_sdk.encrypted.table import EncryptedTable
from aws_encryption_sdk.key_providers.kms import KMSKeyring
# NOTE: This quickstart demonstrates usage of the PARENT library: `aws-sdk-dynamodb-encryption`.
# This internal package (`aws-cryptography-internal-dynamodb`) is NOT for direct use.
# Ensure you have installed the public-facing SDK: `pip install aws-sdk-dynamodb-encryption`
# Configuration
TABLE_NAME = os.environ.get('DYNAMODB_TABLE_NAME', 'my-encrypted-table')
KMS_KEY_ARN = os.environ.get('KMS_KEY_ARN', 'arn:aws:kms:us-west-2:123456789012:key/your-kms-key-id')
REGION = os.environ.get('AWS_REGION', 'us-west-2')
# Initialize boto3 DynamoDB client
dynamodb_client = boto3.client('dynamodb', region_name=REGION)
# Create a KMS Keyring
keyring = KMSKeyring(key_ids=[KMS_KEY_ARN])
# Create an EncryptedTable instance for your DynamoDB table
# The master key provider is used to encrypt/decrypt data on the client side
encrypted_table = EncryptedTable(
table=boto3.resource('dynamodb', region_name=REGION).Table(TABLE_NAME),
keyring=keyring
)
# Example: Put an item into the encrypted table
item_id = 'item123'
item_data = {'id': item_id, 'data': 'sensitive_info', 'cleartext_attribute': 'visible_data'}
print(f"Putting item: {item_data}")
encrypted_table.put_item(Item=item_data)
# Example: Get an item from the encrypted table
retrieved_item = encrypted_table.get_item(Key={'id': item_id})['Item']
print(f"Retrieved item: {retrieved_item}")
# Verify decryption (sensitive_info should be visible)
assert retrieved_item['data'] == 'sensitive_info'
print("Item successfully encrypted and decrypted.")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aws_dynamodb_encryption_sdk'
Attempting to import from the public DynamoDB Encryption SDK module (`aws_dynamodb_encryption_sdk`) after only installing its internal dependency (`aws-cryptography-internal-dynamodb`).
fixInstall the full AWS SDK for DynamoDB Encryption: `pip install aws-sdk-dynamodb-encryption`.
AttributeError: module 'aws_cryptography_internal_dynamodb' has no attribute 'EncryptedTable'
Mistakenly attempting to use `aws-cryptography-internal-dynamodb` as if it were the public-facing DynamoDB Encryption SDK and trying to access its classes.
fixAll public interfaces for DynamoDB client-side encryption are provided by `aws-sdk-dynamodb-encryption`. Install that library and import classes like `EncryptedTable` from `aws_dynamodb_encryption_sdk`.
Upgrade
Version history
1.11.2latest on PyPI · released Feb 23, 2026
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.