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

GRANT

Function

GRANT is used to grant permissions in LakeFormation.

Syntax

1
GRANT privileges [ WITH GRANT ] ON privilege_target TO grantee_list;

WITH GRANT indicates cascading authorization, which means that the authorized user can grant the same permissions to other users.

Specifically:

  • privileges can be:
    1
    2
    3
    4
    | [ READ, WRITE, DESCRIBE, EXECUTE, ALTER, DROP, INSERT, SELECT, UPDATE, DELETE ] [, ...]
    | ALL
    | ALL PRIVILEGE
    | ALL PRIVILEGES
    
  • privilege_target can be:
    1
    2
    3
    4
    5
    6
    7
    | DATABASE name_list
    | SCHEMA name_list
    | TABLE qualified_name_list
    | FUNCTION function_with_argtypes_list
    | PATH obs_path_list
    | ALL TABLES IN SCHEMA name_list
    | ALL FUNCTIONS IN SCHEMA name_list
    

    Specifically:

    • name_list is as follows:
      1
      | name [, ...]
      
    • qualified_name_list is as follows:
      1
      | qualified_name [, ...]
      
    • function_with_argtypes_list is as follows:
      1
      | function_with_argtypes [, ...]
      
    • obs_path_list is as follows:
      1
      | SCONST [, ...]
      
  • grantee_list can be:
    1
    2
    3
    | USER RoleId [, ...]
    | USER GROUP RoleId [, ...]
    | ROLE RoleId [, ...]