Updated on 2026-11-06 GMT+08:00

Overview of Permission Management for LakeFormation Integration

As a unified metadata and permission management service, LakeFormation enforces fine-grained permission isolation for catalogs, databases, and tables. After metadata is created, you need to configure data access permissions for users (when the operator is a user) or agencies (when the operator is a service) so that jobs can access the required metadata and data resources.

Permission management for LakeFormation integration involves two levels:

  • Level 1: IAM cloud service authorization or agency:
    • When the operator is a user: Grant IAM users or user groups the permissions to use LakeFormation.

      For details about IAM authorization, see Creating an IAM User and Granting the LakeFormation Permissions.

    • When the operator is a service: Authorize AI DataLake to access LakeFormation on your behalf through an agency.

      When using AI DataLake for the first time, you must authorize the service to access other cloud resources on your behalf. This step grants the permissions needed to create workspaces and develop jobs. It includes configuring permissions to access services such as LakeFormation, AOM, DCS, LTS, DEW, and OBS, as needed. For details, see Enabling AI DataLake and Granting Permissions.

      When an agency is used and the operator is AI DataLake itself, AI DataLake must obtain a temporary credential to access resources on your behalf.

  • Level 2: Resource authorization: On the LakeFormation console, grant permissions for specific resources (catalogs, databases, tables, columns, or functions) to control which metadata users or agencies can access.

    For example, User A can access only table_1, while User B can access only table_2. For details, see Configuring LakeFormation Metadata Permissions.

The following table lists the authorization operations for integrating different engines with LakeFormation, by job type. Table 1 provides details.

Table 1 Permission management for LakeFormation integration by job type

Operation Scenario

Operation Entity

Level 1: IAM Cloud Service Authorization (API Permission)

Level 2: Resource Authorization (Catalog, Database, and Table Permission)

Related Link

AuraJobV2

IAM user

Create an IAM policy, and attach it to a user or user group.

On the LakeFormation console, grant users, user groups, and roles permissions to access specified catalogs, databases, and tables.

LakeFormation Authorization for AuraJobV2

SparkSQL

IAM user

Create an IAM policy, and attach it to a user or user group.

On the LakeFormation console, grant users, user groups, and roles permissions to access specified catalogs, databases, and tables.

LakeFormation Authorization for SparkSQL

SparkJob

Agency

Create an IAM agency, and select it in the endpoint job configuration.

On the LakeFormation console, grant roles and agencies permissions to access specified catalogs, databases, and tables.

LakeFormation Authorization for SparkJob

If LakeFormation is integrated, the IAM account name cannot contain hyphens (-). Otherwise, an error will occur when you submit the Spark job.

Why Do SparkSQL and AuraJobV2 Use User Identities While SparkJob Uses Agency Identities?

  • SparkSQL and AuraJobV2: A user directly submits SQL statements on the console or through APIs. AI DataLake forwards the request to LakeFormation as the user. Therefore, IAM policies are configured directly for users or user groups.
  • SparkJob: After a user submits a JAR package, AI DataLake hosts the job and runs it in the Spark cluster backend. Because the operator becomes AI DataLake, you must use an agency to authorize AI DataLake to access LakeFormation.