Creating a Resource Link to a Shared Data Catalog Table - AWS Lake Formation

Creating a Resource Link to a Shared Data Catalog Table

You can create a resource link to a shared table by using the AWS Lake Formation console, API, or AWS Command Line Interface (AWS CLI).

To create a resource link to a shared table (console)

  1. Open the AWS Lake Formation console at https://console.aws.amazon.com/lakeformation/. Sign in as a principal who has the Lake Formation CREATE_TABLE permission on the database to contain the resource link.

  2. In the navigation pane, choose Tables, and then choose Create table.

  3. On the Create table page, choose the Resource Link tile, and then provide the following information:

    Resource link name

    Enter a name that adheres to the same rules as a table name. The name can be the same as the target shared table.

    Database

    The database in the local Data Catalog to contain the resource link.

    Shared table

    Select a shared table from the list, or enter a local (owned) or shared table name.

    The list contains all the tables shared with your account. Note the database and owner account ID that are listed with each table. If you don't see a table that you know was shared with your account, check the following:

    • If you aren't a data lake administrator, check that the data lake administrator granted you Lake Formation permissions on the table.

    • If you are a data lake administrator, and your account is not in the same AWS organization as the granting account, ensure that you have accepted the AWS Resource Access Manager (AWS RAM) resource share invitation for the table. For more information, see Accepting a Resource Share Invitation from AWS RAM.

    Shared table's database

    If you selected a shared table from the list, this field is populated with the shared table's database in the external account. Otherwise, enter a local database (for a resource link to a local table) or the shared table's database in the external account.

    Shared table owner

    If you selected a shared table from the list, this field is populated with the shared table's owner account ID. Otherwise, enter your AWS account ID (for a resource link to a local table) or the ID of the AWS account that shared the table.

    
            The Table details dialog box has the Resource link radio button selected, with
              the following fields filled in: Resource link name, Database, Shared table, Shared
              table's database, and Shared table owner ID. The last two fields are disabled
              (read-only).
  4. Choose Create to create the resource link.

    You can then view the resource link name under the Name column on the Tables page.

  5. (Optional) Grant the Lake Formation DESCRIBE permission to principals that must be able to view the link and access the link target through the link.

To create a resource link to a shared table (AWS CLI)

  1. Enter a command similar to the following.

    aws glue create-table --database-name myissues --table-input '{"Name":"mycustomers","TargetTable":{"CatalogId":"111122223333","DatabaseName":"issues","Name":"customers"}}'

    This command creates a resource link named mycustomers to the shared table customers, which is in the database issues in the AWS account 1111-2222-3333. The resource link is stored in the local database myissues.

  2. (Optional) Grant the Lake Formation DESCRIBE permission to principals that must be able to view the link and access the link target through the link.