Cross-account integration considerations with CMK
When you attempt to integrate from DynamoDB to Amazon Redshift, the initial action is launched from Amazon Redshift. Without the proper permissions, this action could result in a silent failure. The following sections detail the permissions required for this cross-account integration.
Required AWS KMS policies and permissions
Replace the following placeholders in the examples:
-
111122223333
: The AWS account ID where Amazon Redshift is hosted -
444455556666
: The AWS account ID where DynamoDB is hosted -
REDSHIFT_ROLE_NAME
: The IAM role name used by Amazon Redshift -
REGION
: The AWS Region where your resources are located -
TABLE_NAME
: The name of your DynamoDB table -
KMS_KEY_ID
: The ID of your KMS key
KMS key policy in the DynamoDB account
The following AWS KMS key policy enables cross-account access between your DynamoDB and Amazon Redshift services. In this example, account 444455556666 contains the DynamoDB table and AWS KMS key, while account 111122223333 contains the Amazon Redshift cluster that needs access to decrypt the data.
IAM Policy for the Amazon Redshift role (in Amazon Redshift account)
The following IAM policy allows a Amazon Redshift service to access DynamoDB tables and their associated AWS KMS encryption keys in a cross-account scenario. In this example, account 444455556666 contains the DynamoDB resources and AWS KMS keys that the Amazon Redshift service needs to access.
Trust relationship for the Amazon Redshift role
DynamoDB Table policy (if using resource-based policies)
The following resource-based policy allows a Amazon Redshift service in account 111122223333 to access DynamoDB tables and Streams in account 444455556666. Attach this policy to your DynamoDB table to enable cross-account access.
Important considerations
-
Ensure the KMS key is in the same region as your DynamoDB table.
-
The KMS key must be a customer managed key (CMK), not an AWS managed key.
-
If you're using DynamoDB global tables, configure permissions for all relevant regions.
-
Consider adding condition statements to restrict access based on VPC endpoints or IP ranges.
-
For enhanced security, consider using
aws:PrincipalOrgID
condition to restrict access to your organization. -
Monitor KMS key usage through CloudTrail and CloudWatch metrics.