- Newest
- Most votes
- Most comments
Based on the error message "No permission to access Key 'arn:aws:kms:us-west-2:049306850934:key/aa11f6bf-94af-4464-b8ba-49fc824b777d'", it appears that your AWS DMS (Database Migration Service) doesn't have the necessary permissions to access the KMS key being used.
Looking at your KMS policy, I notice that you've granted permissions to the DMS Serverless service-linked role, but the error might be occurring because the regular DMS service role doesn't have the required permissions. DMS Serverless and standard DMS use different service roles.
To resolve this issue, you should:
-
Add permissions for the standard DMS service role to your KMS key policy. Add a statement similar to the one you have for the DMS Serverless role, but for the regular DMS service role (typically named "dms-vpc-role" or similar).
-
Ensure that the IAM role used by your DMS replication instance has the necessary permissions to use the KMS key. This role needs permissions for actions like kms:Encrypt, kms:Decrypt, kms:GenerateDataKey, and kms:DescribeKey.
-
Check if you're using the correct KMS key ARN in your DMS configuration. The error specifically mentions a key ARN, so make sure this is the key you've configured in your policy.
-
If you're using a cross-account setup, ensure that proper cross-account permissions are configured for the KMS key.
Additionally, since you mentioned that the initial data was migrated using a snapshot with a different KMS key, there might be a mismatch between the KMS keys used for the initial data and the incremental migration. Ensure that your DMS task is configured to use the correct KMS key that has the proper permissions.
Sources
How to resolve the error “Access denied for operation 'DeleteAlias'.” | AWS re:Post
Relevant content
- asked 3 years ago
- asked a year ago
- asked 9 months ago
- asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
