Help Center/ DataArts Lake Formation/ FAQs/ Metadata Migration/ The Error " No privilege to this kms operation" Is Displayed When a Metadata Migration or Discovery Task Is Executed
Updated on 2025-10-24 GMT+08:00

The Error " No privilege to this kms operation" Is Displayed When a Metadata Migration or Discovery Task Is Executed

Symptom

When a metadata migration or discovery task is executed, the error " No privilege to this kms operation" is displayed.

Procedure

To solve this problem, you need to create a custom policy and add it to lakeformation_job_trust.

  1. Create a custom policy.

    1. Log in to the IAM console.
    2. In the navigation pane on the left, choose Permissions > Policies/Roles.
    3. Create the lakeformation_kms_permission policy. (If a policy with the same permissions already exists, skip this step.)
      Click Create Custom Policy. Set the parameters as follows and click OK.
      • Policy Name: Enter a policy name, for example, lakeformation_kms_permission.
      • Policy View: Select JSON.
      • Policy Content: Enter the following content:
        {
            "Version": "1.1",
            "Statement": [
                {
                    "Effect": "Allow",
                    "Action": [
                        "kms:dek:encrypt",
                        "kms:cmk:create",
                        "kms:cmk:decrypt",
                        "kms:dek:create",
                        "kms:cmk:encrypt",
                        "kms:dek:crypto",
                        "kms:dek:decrypt"
                    ]
                }
            ]
        }
      • Description: Enter "The necessary permissions for lakeformation service to access encrypted obs file system, KMS related permission."

  1. Add the created policies to lakeformation_job_trust.

    1. In the navigation pane of the IAM console, choose Agencies. On the displayed page, search for lakeformation_job_trust and click Authorize in the Operation column.
    2. Search for and select the custom permission policy (for example, lakeformation_kms_permission) created in Step 1 and click Next.

    3. On the Select Scope page, retain the default settings and click OK.

      Wait for 15 to 30 minutes for the new permissions to take effect.