'Error while creating database using AWS Glue
I created a service role using AWS documentation with the following trust relationship
{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": "glue.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
In terms of the policies attached to the role, I have attached AWSGlueService policy and Amazons3FullAccess policy. Additionally I have attached the kms policy as below just in case if it tries to decrypt something
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "kms:" ], "Resource": [ "" ] } ] }
As a matter of fact, I tried this in one AWS account and I tried to create database, and I can create a database under AWS Glue>Databases>Add Database. It is working fine.
When I try to confiqure the same policies in another aws account, it throws the following error
{"service":"AWSGlue","statusCode":400,"errorCode":"GlueEncryptionException","requestId":"5c852699-d6c8-48df-8793-bbaab85cf783","errorMessage":"Invalid keyId aws/glue (Service: AWSKMS; Status Code: 400; Error Code: NotFoundException; Request ID: 314f7791-8b25-4bcc-bf56-b0b55e76d300; Proxy: null)","type":"AwsServiceError"}
I kind of understand that I am missing something fundamental. I could not get this resolved. Please could you help me understand, what I am missing in the permissions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
